Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17524 from jklymak/enh-add-suplabels
ENH: add supxlabel and supylabel
- Loading branch information
Showing
9 changed files
with
205 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
supxlabel and supylabel | ||
----------------------- | ||
|
||
It is possible to add x- and y-labels to a whole figure, analogous to | ||
`.FigureBase.suptitle` using the new `.FigureBase.supxlabel` and | ||
`.FigureBase.supylabel` methods. | ||
|
||
.. plot:: | ||
|
||
np.random.seed(19680801) | ||
fig, axs = plt.subplots(3, 2, figsize=(5, 5), constrained_layout=True, | ||
sharex=True, sharey=True) | ||
|
||
for nn, ax in enumerate(axs.flat): | ||
ax.set_title(f'Channel {nn}') | ||
ax.plot(np.cumsum(np.random.randn(50))) | ||
|
||
fig.supxlabel('Time [s]') | ||
fig.supylabel('Data [V]') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+39 Bytes
(100%)
lib/matplotlib/tests/baseline_images/test_figure/test_subfigure.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+52.4 KB
lib/matplotlib/tests/baseline_images/test_figure/test_subfigure_double.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-19 Bytes
(100%)
lib/matplotlib/tests/baseline_images/test_figure/test_subfigure_ss.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters