| [ Web Proxy ] |
| Viewing: https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.subplot_mosaic.html | [Back] [Original] |
Section Navigation
matplotlibmatplotlib.animationmatplotlib.artistmatplotlib.axesmatplotlib.axismatplotlib.backend_basesmatplotlib.backend_managersmatplotlib.backend_toolsmatplotlib.backendsmatplotlib.backends.backend_mixedmatplotlib.backends.backend_templatematplotlib.backends.backend_aggmatplotlib.backends.backend_cairomatplotlib.backends.backend_gtk3agg, matplotlib.backends.backend_gtk3cairomatplotlib.backends.backend_gtk4agg, matplotlib.backends.backend_gtk4cairomatplotlib.backends.backend_nbaggmatplotlib.backends.backend_pdfmatplotlib.backends.backend_pgfmatplotlib.backends.backend_psmatplotlib.backends.registrymatplotlib.backends.backend_qtagg, matplotlib.backends.backend_qtcairomatplotlib.backends.backend_svgmatplotlib.backends.backend_tkagg, matplotlib.backends.backend_tkcairomatplotlib.backends.backend_webagg_corematplotlib.backends.backend_webaggmatplotlib.backends.backend_wxagg, matplotlib.backends.backend_wxcairomatplotlib.beziermatplotlib.categorymatplotlib.cbookmatplotlib.cmmatplotlib.collectionsmatplotlib.colorbarmatplotlib.colorizermatplotlib.colorsmatplotlib.containermatplotlib.contourmatplotlib.datesmatplotlib.dvireadmatplotlib.figurematplotlib.font_managermatplotlib.ft2fontmatplotlib.gridspec
matplotlib.hatchmatplotlib.imagematplotlib.insetmatplotlib.layout_enginematplotlib.legendmatplotlib.legend_handlermatplotlib.lines
matplotlib.markers
matplotlib.mathtextmatplotlib.mlabmatplotlib.offsetboxmatplotlib.patchesmatplotlib.pathmatplotlib.patheffectsmatplotlib.pyplotmatplotlib.projections
matplotlib.quiver
matplotlib.rcsetupmatplotlib.sankeymatplotlib.scalematplotlib.sphinxext.mathmplmatplotlib.sphinxext.plot_directivematplotlib.sphinxext.figmpl_directivematplotlib.sphinxext.rolesmatplotlib.spinesmatplotlib.stylematplotlib.tablematplotlib.testingmatplotlib.textmatplotlib.texmanagermatplotlib.tickermatplotlib.transformsmatplotlib.trimatplotlib.typingmatplotlib.unitsmatplotlib.widgetsmatplotlib._afmmatplotlib._apimatplotlib._docstringmatplotlib._enumsmatplotlib._type1fontmatplotlib._tight_bboxmatplotlib._tight_layoutmpl_toolkits.mplot3dmpl_toolkits.axes_grid1mpl_toolkits.axisartistpylabmatplotlib.pyplotBuild a layout of Axes based on ASCII art or nested lists.
This is a helper function to build complex GridSpec layouts visually.
See Complex and semantic figure composition (subplot_mosaic) for an example and full API documentation
A visual layout of how you want your Axes to be arranged labeled as strings. For example
x = [['A panel', 'A panel', 'edge'],
['C panel', '.', 'edge']]
produces 4 Axes:
'A panel' which is 1 row high and spans the first two columns
'edge' which is 2 rows high and is on the right edge
'C panel' which in 1 row and 1 column wide in the bottom left
a blank space 1 row and 1 column wide in the bottom center
Any of the entries in the layout can be a list of lists of the same form to create nested layouts.
If input is a str, then it must be of the form
'''
AAE
C.E
'''
where each character is a column and each line is a row. This only allows only single character Axes labels and does not allow nesting but is very terse.
If True, the x-axis (sharex) or y-axis (sharey) will be shared
among all subplots. In that case, tick label visibility and axis units
behave as for subplots. If False, each subplot's x- or y-axis will
be independent.
Defines the relative widths of the columns. Each column gets a
relative width of width_ratios[i] / sum(width_ratios).
If not given, all columns will have the same width. Convenience
for gridspec_kw={'width_ratios': [...]}.
Defines the relative heights of the rows. Each row gets a
relative height of height_ratios[i] / sum(height_ratios).
If not given, all rows will have the same height. Convenience
for gridspec_kw={'height_ratios': [...]}.
Entry in the layout to mean "leave this space empty". Defaults
to '.'. Note, if layout is a string, it is processed via
inspect.cleandoc to remove leading white space, which may
interfere with using white-space as the empty sentinel.
Dictionary with keywords passed to the Figure.add_subplot call
used to create each subplot. These values may be overridden by
values in per_subplot_kw.
A dictionary mapping the Axes identifiers or tuples of identifiers
to a dictionary of keyword arguments to be passed to the
Figure.add_subplot call used to create each subplot. The values
in these dictionaries have precedence over the values in
subplot_kw.
If mosaic is a string, and thus all keys are single characters,
it is possible to use a single string instead of a tuple as keys;
i.e. "AB" is equivalent to ("A", "B").
Added in version 3.7.
Dictionary with keywords passed to the GridSpec constructor used
to create the grid the subplots are placed on.
All additional keyword arguments are passed to the
pyplot.figure call.
FigureThe new figure
A dictionary mapping the labels to the Axes objects. The order of the Axes is left-to-right and top-to-bottom of their position in the total layout.
matplotlib.pyplot.subplot_mosaic#Complex and semantic figure composition (subplot_mosaic)
Copyright 20022012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 20122026 The Matplotlib development team.
Created using Sphinx 9.1.0.
Built from v3.11.2-1-g879ad8ebba.
Built with the PyData Sphinx Theme 0.16.1.
| Web Proxy Viewer | New URL | Original Page |