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
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |
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
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 86 87 88 89 90 91 92 93 94 95 96 | |
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
Nonethe 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
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | |