Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eb20041

Browse files
committed
Switch to constrained layout.
1 parent 4eb3ede commit eb20041

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

doc/users/next_whats_new/colorbar_has_location_argument.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ An example is:
1919
import numpy as np
2020
rng = np.random.default_rng(19680801)
2121
imdata = rng.random((10, 10))
22-
fig, ax = plt.subplots()
22+
fig, ax = plt.subplots(layout='constrained')
2323
im = ax.imshow(imdata)
2424
fig.colorbar(im, cax=ax.inset_axes([0, 1.05, 1, 0.05]),
2525
location='top')
26-
fig.tight_layout()

0 commit comments

Comments
 (0)