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

Skip to content

Commit e26d497

Browse files
authored
Merge pull request #18353 from l-johnston/issue_18345
DOCS: describe shared axes behavior with units
2 parents df61699 + 26ae2dc commit e26d497

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/matplotlib/gridspec.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,10 @@ def subplots(self, *, sharex=False, sharey=False, squeeze=True,
286286
first column subplot are created. To later turn other subplots'
287287
ticklabels on, use `~matplotlib.axes.Axes.tick_params`.
288288
289+
When subplots have a shared axis that has units, calling
290+
`~matplotlib.axis.Axis.set_units` will update each axis with the
291+
new units.
292+
289293
squeeze : bool, optional, default: True
290294
- If True, extra dimensions are squeezed out from the returned
291295
array of Axes:

lib/matplotlib/pyplot.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,6 +1258,10 @@ def subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True,
12581258
column subplot are created. To later turn other subplots' ticklabels
12591259
on, use `~matplotlib.axes.Axes.tick_params`.
12601260
1261+
When subplots have a shared axis that has units, calling
1262+
`~matplotlib.axis.Axis.set_units` will update each axis with the
1263+
new units.
1264+
12611265
squeeze : bool, default: True
12621266
- If True, extra dimensions are squeezed out from the returned
12631267
array of `~matplotlib.axes.Axes`:

0 commit comments

Comments
 (0)