DOC: add a couple more placement examples, crosslink axes_grid [ci doc] · matplotlib/matplotlib@c234384 · GitHub
Skip to content

Commit c234384

Browse files
jklymakrcomer
andcommitted
DOC: add a couple more placement examples, crosslink axes_grid [ci doc]
Co-authored-by: Ruth Comer <10599679+rcomer@users.noreply.github.com>
1 parent 7d2acfd commit c234384

3 files changed

Lines changed: 88 additions & 12 deletions

File tree

galleries/examples/axes_grid1/demo_colorbar_with_axes_divider.py

Lines changed: 6 additions & 0 deletions

galleries/examples/axes_grid1/demo_colorbar_with_inset_locator.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
"""
2+
.. _demo-colorbar-with-inset-locator:
3+
24
==============================================================
35
Controlling the position and size of colorbars with Inset Axes
46
==============================================================
57
6-
This example shows how to control the position, height, and width of
7-
colorbars using `~mpl_toolkits.axes_grid1.inset_locator.inset_axes`.
8+
This example shows how to control the position, height, and width of colorbars
9+
using `~mpl_toolkits.axes_grid1.inset_locator.inset_axes`.
810
911
Inset axes placement is controlled as for legends: either by providing a *loc*
1012
option ("upper right", "best", ...), or by providing a locator with respect to
1113
the parent bbox. Parameters such as *bbox_to_anchor* and *borderpad* likewise
1214
work in the same way, and are also demonstrated here.
15+
16+
Users should consider using `.Axes.inset_axes` instead (see
17+
:ref:`colorbar_placement`).
18+
1319
"""
1420

1521
import matplotlib.pyplot as plt

galleries/users_explain/axes/colorbar_placement.py

Lines changed: 74 additions & 10 deletions

0 commit comments

Comments
 (0)