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 ? Machine Learning
avec Scikit-Learn
Voir le programme détaillé
Classe « Text »

Méthode matplotlib.pyplot.Text.get_window_extent

Signature de la méthode get_window_extent

def get_window_extent(self, renderer=None, dpi=None) 

Description

help(Text.get_window_extent)

Return the `.Bbox` bounding the text, in display units.

In addition to being used internally, this is useful for specifying
clickable regions in a png file on a web page.

Parameters
----------
renderer : Renderer, optional
    A renderer is needed to compute the bounding box.  If the artist
    has already been drawn, the renderer is cached; thus, it is only
    necessary to pass this argument when calling `get_window_extent`
    before the first draw.  In practice, it is usually easier to
    trigger a draw first, e.g. by calling
    `~.Figure.draw_without_rendering` or ``plt.show()``.

dpi : float, optional
    The dpi value for computing the bbox, defaults to
    ``self.get_figure(root=True).dpi`` (*not* the renderer dpi); should be set
    e.g. if to match regions with a figure saved with a custom dpi value.


Vous êtes un professionnel et vous avez besoin d'une formation ? Machine Learning
avec Scikit-Learn
Voir le programme détaillé