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

Skip to content

Commit 5caf399

Browse files
committed
Switch to constrained layout.
1 parent 7e71feb commit 5caf399

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

doc/users/next_whats_new/imshow_extent_units.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ can now be expressed with units.
1111
from matplotlib.dates import HourLocator, DateFormatter
1212
from matplotlib.ticker import AutoMinorLocator
1313

14-
fig, ax = plt.subplots(figsize=(6, 4))
14+
fig, ax = plt.subplots(layout='constrained')
1515
date_first = np.datetime64('2020-01-01', 'D')
1616
date_last = np.datetime64('2020-01-11', 'D')
1717

@@ -23,6 +23,4 @@ can now be expressed with units.
2323
ax.yaxis.set_major_locator(HourLocator(byhour=[0, 12, 24]))
2424
ax.yaxis.set_minor_locator(AutoMinorLocator())
2525

26-
fig.tight_layout()
27-
2826
plt.show()

0 commit comments

Comments
 (0)