solarwindpy.plotting.tools.multipanel_figure_shared_cbar
- multipanel_figure_shared_cbar(nrows: int, ncols: int, vertical_cbar: bool = True, sharex: bool = True, sharey: bool = True, **kwargs)[source]
Create a grid of axes that share a single colorbar.
This is a lightweight wrapper around
build_ax_array_with_common_colorbar()for backward compatibility.- Parameters:
nrows (int) – Shape of the axes grid.
ncols (int) – Shape of the axes grid.
vertical_cbar (bool, optional) – If
Truethe colorbar is placed to the right of the axes; otherwise it is placed above them.sharex (bool, optional) – If
Trueshare the respective axis limits across all panels.sharey (bool, optional) – If
Trueshare the respective axis limits across all panels.**kwargs – Additional arguments controlling layout such as
figsizeor grid ratios.
- Returns:
fig (
matplotlib.figure.Figure)axes (ndarray of
matplotlib.axes.Axes)cax (
matplotlib.axes.Axes)
Examples
>>> fig, axs, cax = multipanel_figure_shared_cbar(2, 2)