Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9cfe4e9

Browse filesBrowse files
committed
DOC: clarify how colorbar steals space
1 parent 5a89bdb commit 9cfe4e9
Copy full SHA for 9cfe4e9

File tree

Expand file treeCollapse file tree

1 file changed

+8
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-4
lines changed

‎lib/matplotlib/figure.py

Copy file name to clipboardExpand all lines: lib/matplotlib/figure.py
+8-4Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,12 +1220,16 @@ def colorbar(
12201220
fig.colorbar(cm.ScalarMappable(norm=norm, cmap=cmap), ax=ax)
12211221
12221222
cax : `~matplotlib.axes.Axes`, optional
1223-
Axes into which the colorbar will be drawn.
1223+
Axes into which the colorbar will be drawn. If `None`, then space
1224+
will be stolen from the Axes(s) specified in *ax*
12241225
12251226
ax : `~.axes.Axes` or iterable or `numpy.ndarray` of Axes, optional
1226-
One or more parent axes from which space for a new colorbar axes
1227-
will be stolen, if *cax* is None. This has no effect if *cax* is
1228-
set.
1227+
If `None`, defaults to ``mappable.axes``.
1228+
1229+
If *cax* is None, specifies the one or more parent axes from which
1230+
space for a new colorbar axes will be stolen.
1231+
1232+
This has no effect if *cax* is set.
12291233
12301234
use_gridspec : bool, optional
12311235
If *cax* is ``None``, a new *cax* is created as an instance of

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.