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 ? Programmation Python
Les compléments
Voir le programme détaillé
Classe « FigureBase »

Méthode matplotlib.figure.FigureBase.align_titles

Signature de la méthode align_titles

def align_titles(self, axs=None) 

Description

help(FigureBase.align_titles)

Align the titles of subplots in the same subplot row if title
alignment is being done automatically (i.e. the title position is
not manually set).

Alignment persists for draw events after this is called.

Parameters
----------
axs : list of `~matplotlib.axes.Axes`
    Optional list of (or ndarray) `~matplotlib.axes.Axes`
    to align the titles.
    Default is to align all Axes on the figure.

See Also
--------
matplotlib.figure.Figure.align_xlabels
matplotlib.figure.Figure.align_ylabels
matplotlib.figure.Figure.align_labels

Notes
-----
This assumes that all Axes in ``axs`` are from the same `.GridSpec`,
so that their `.SubplotSpec` positions correspond to figure positions.

Examples
--------
Example with titles::

    fig, axs = plt.subplots(1, 2)
    axs[0].set_aspect('equal')
    axs[0].set_title('Title 0')
    axs[1].set_title('Title 1')
    fig.align_titles()


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é