Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Sensibilisation à
l'Intelligence Artificielle
Voir le programme détaillé
Module « matplotlib.pyplot »

Fonction subplot2grid - module matplotlib.pyplot

Signature de la fonction subplot2grid

def subplot2grid(shape: 'tuple[int, int]', loc: 'tuple[int, int]', rowspan: 'int' = 1, colspan: 'int' = 1, fig: 'Figure | None' = None, **kwargs) -> 'matplotlib.axes.Axes' 

Description

help(matplotlib.pyplot.subplot2grid)

Create a subplot at a specific location inside a regular grid.

Parameters
----------
shape : (int, int)
    Number of rows and of columns of the grid in which to place axis.
loc : (int, int)
    Row number and column number of the axis location within the grid.
rowspan : int, default: 1
    Number of rows for the axis to span downwards.
colspan : int, default: 1
    Number of columns for the axis to span to the right.
fig : `.Figure`, optional
    Figure to place the subplot in. Defaults to the current figure.
**kwargs
    Additional keyword arguments are handed to `~.Figure.add_subplot`.

Returns
-------
`~.axes.Axes`

    The Axes of the subplot. The returned Axes can actually be an instance
    of a subclass, such as `.projections.polar.PolarAxes` for polar
    projections.

Notes
-----
The following call ::

    ax = subplot2grid((nrows, ncols), (row, col), rowspan, colspan)

is identical to ::

    fig = gcf()
    gs = fig.add_gridspec(nrows, ncols)
    ax = fig.add_subplot(gs[row:row+rowspan, col:col+colspan])


Vous êtes un professionnel et vous avez besoin d'une formation ? Mise en oeuvre d'IHM
avec Qt et PySide6
Voir le programme détaillé