subplots
Wrapper for matplotlib functions for subplots.
hide_empty_axes(axs=None)
¶
Hide empty axes.
Loop over all axes and hide empty ones.
Parameters:
-
axs
(mpl.axes.Axes or list of
, default:None
) –Specify matplotlib.axes.Axes to check for empty state. Default use all of current figure.
Source code in src/prettypyplot/subplots.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
|
label_outer(axs=None)
¶
Only show outer labels and tick labels.
This checks for outest visible axes only. Works only with single Gridspec.
Parameters:
-
axs
(mpl.axes.AxesSubplot or list of
, default:None
) –Specify matplotlib.axes.Axes to check for labeling only outer. Default use all of current figure.
Source code in src/prettypyplot/subplots.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
|
subplot_labels(*, fig=None, xlabel=None, ylabel=None)
¶
Add global labels for subplots.
This method adds shared x- and y-labels for a grid of subplots. These can
be created by, e.g. fig, axs = plt.subplots(...)
.
Parameters:
-
fig
(matplotlib figure
, default:None
) –If
None
the current figure will be used instead. -
xlabel
(str
, default:None
) –String of x label.
-
ylabel
(str
, default:None
) –String of y label.
Source code in src/prettypyplot/subplots.py
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
|