matplotlib.gridspec
gridspec
contains classes that help to layout multiple
~.axes.Axes in a grid-like pattern within a figure.
The GridSpec specifies the overall grid structure. Individual cells within the grid are referenced by SubplotSpecs.
Often, users need not access this module directly, and can use higher-level methods like ~.pyplot.subplots, ~.pyplot.subplot_mosaic and ~.Figure.subfigures. See the tutorial /tutorials/intermediate/arranging_axes for a guide.