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 ? Calcul scientifique
avec Python
Voir le programme détaillé
Classe « FigureBase »

Méthode matplotlib.pyplot.FigureBase.align_ylabels

Signature de la méthode align_ylabels

def align_ylabels(self, axs=None) 

Description

help(FigureBase.align_ylabels)

Align the ylabels of subplots in the same subplot column if label
alignment is being done automatically (i.e. the label position is
not manually set).

Alignment persists for draw events after this is called.

If a label is on the left, it is aligned with labels on Axes that
also have their label on the left and that have the same
left-most subplot column.  If the label is on the right,
it is aligned with labels on Axes with the same right-most column.

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

See Also
--------
matplotlib.figure.Figure.align_xlabels
matplotlib.figure.Figure.align_titles
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 large yticks labels::

    fig, axs = plt.subplots(2, 1)
    axs[0].plot(np.arange(0, 1000, 50))
    axs[0].set_ylabel('YLabel 0')
    axs[1].set_ylabel('YLabel 1')
    fig.align_ylabels()


Vous êtes un professionnel et vous avez besoin d'une formation ? Deep Learning avec Python
et Keras et Tensorflow
Voir le programme détaillé