File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Original file line number Diff line number Diff line change @@ -294,15 +294,17 @@ def example_plot(ax, fontsize=12, nodec=False):
294
294
# Spacing with colorbars
295
295
# -----------------------
296
296
#
297
- # Colorbars still respect the ``w_pad`` and ``h_pad`` values. However they will
298
- # be ``wspace`` and ``hsapce`` apart from other subplots. Note the use of a
299
- # ``pad`` kwarg here in the ``colorbar`` call. It defaults to 0.02 of the size
297
+ # Colorbars will be placed ``wspace`` and ``hsapce`` apart from other
298
+ # subplots. The padding between the colorbar and the axis it is
299
+ # attached to will never be less than ``w_pad`` (for a vertical colorbar)
300
+ # or ``h_pad`` (for a horizontal colorbar). Note the use of the ``pad`` kwarg
301
+ # here in the ``colorbar`` call. It defaults to 0.02 of the size
300
302
# of the axis it is attached to.
301
303
302
304
fig , axs = plt .subplots (2 , 2 , constrained_layout = True )
303
305
for ax in axs .flatten ():
304
306
pc = ax .pcolormesh (arr , ** pc_kwargs )
305
- fig .colorbar (im , ax = ax , shrink = 0.6 , pad = 0 )
307
+ fig .colorbar (pc , ax = ax , shrink = 0.6 , pad = 0 )
306
308
ax .set_xticklabels ('' )
307
309
ax .set_yticklabels ('' )
308
310
fig .set_constrained_layout_pads (w_pad = 2. / 72. , h_pad = 2. / 72. ,
You can’t perform that action at this time.
0 commit comments