File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Original file line number Diff line number Diff line change @@ -1223,12 +1223,16 @@ def colorbar(
1223
1223
fig.colorbar(cm.ScalarMappable(norm=norm, cmap=cmap), ax=ax)
1224
1224
1225
1225
cax : `~matplotlib.axes.Axes`, optional
1226
- Axes into which the colorbar will be drawn.
1226
+ Axes into which the colorbar will be drawn. If `None`, then a new
1227
+ Axes is created and the space for it will be stolen from the Axes(s)
1228
+ specified in *ax*.
1227
1229
1228
1230
ax : `~.axes.Axes` or iterable or `numpy.ndarray` of Axes, optional
1229
- One or more parent axes from which space for a new colorbar axes
1230
- will be stolen, if *cax* is None. This has no effect if *cax* is
1231
- set.
1231
+ The one or more parent Axes from which space for a new colorbar Axes
1232
+ will be stolen. This parameter is only used if *cax* is not set.
1233
+
1234
+ Defaults to the Axes that contains the mappable used to create the
1235
+ colorbar.
1232
1236
1233
1237
use_gridspec : bool, optional
1234
1238
If *cax* is ``None``, a new *cax* is created as an instance of
@@ -1269,6 +1273,7 @@ def colorbar(
1269
1273
However, this has negative consequences in other circumstances, e.g.
1270
1274
with semi-transparent images (alpha < 1) and colorbar extensions;
1271
1275
therefore, this workaround is not used by default (see issue #1188).
1276
+
1272
1277
"""
1273
1278
1274
1279
if ax is None :
You can’t perform that action at this time.
0 commit comments