Vous êtes un professionnel et vous avez besoin d'une formation ?
Coder avec une
Intelligence Artificielle
Voir le programme détaillé
Classe « Figure »
Signature de la constructeur __init__
def __init__(self, figsize=None, dpi=None, *, facecolor=None, edgecolor=None, linewidth=0.0, frameon=None, subplotpars=None, tight_layout=None, constrained_layout=None, layout=None, **kwargs)
Description
help(Figure.__init__)
Parameters
----------
figsize : 2-tuple of floats, default: :rc:`figure.figsize`
Figure dimension ``(width, height)`` in inches.
dpi : float, default: :rc:`figure.dpi`
Dots per inch.
facecolor : default: :rc:`figure.facecolor`
The figure patch facecolor.
edgecolor : default: :rc:`figure.edgecolor`
The figure patch edge color.
linewidth : float
The linewidth of the frame (i.e. the edge linewidth of the figure
patch).
frameon : bool, default: :rc:`figure.frameon`
If ``False``, suppress drawing the figure background patch.
subplotpars : `~matplotlib.gridspec.SubplotParams`
Subplot parameters. If not given, the default subplot
parameters :rc:`figure.subplot.*` are used.
tight_layout : bool or dict, default: :rc:`figure.autolayout`
Whether to use the tight layout mechanism. See `.set_tight_layout`.
.. admonition:: Discouraged
The use of this parameter is discouraged. Please use
``layout='tight'`` instead for the common case of
``tight_layout=True`` and use `.set_tight_layout` otherwise.
constrained_layout : bool, default: :rc:`figure.constrained_layout.use`
This is equal to ``layout='constrained'``.
.. admonition:: Discouraged
The use of this parameter is discouraged. Please use
``layout='constrained'`` instead.
layout : {'constrained', 'compressed', 'tight', 'none', `.LayoutEngine`, None}, default: None
The layout mechanism for positioning of plot elements to avoid
overlapping Axes decorations (labels, ticks, etc). Note that
layout managers can have significant performance penalties.
- 'constrained': The constrained layout solver adjusts Axes sizes
to avoid overlapping Axes decorations. Can handle complex plot
layouts and colorbars, and is thus recommended.
See :ref:`constrainedlayout_guide` for examples.
- 'compressed': uses the same algorithm as 'constrained', but
removes extra space between fixed-aspect-ratio Axes. Best for
simple grids of Axes.
- 'tight': Use the tight layout mechanism. This is a relatively
simple algorithm that adjusts the subplot parameters so that
decorations do not overlap.
See :ref:`tight_layout_guide` for examples.
- 'none': Do not use a layout engine.
- A `.LayoutEngine` instance. Builtin layout classes are
`.ConstrainedLayoutEngine` and `.TightLayoutEngine`, more easily
accessible by 'constrained' and 'tight'. Passing an instance
allows third parties to provide their own layout engine.
If not given, fall back to using the parameters *tight_layout* and
*constrained_layout*, including their config defaults
:rc:`figure.autolayout` and :rc:`figure.constrained_layout.use`.
Other Parameters
----------------
**kwargs : `.Figure` properties, optional
Properties:
agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image
alpha: scalar or None
animated: bool
canvas: FigureCanvas
clip_box: `~matplotlib.transforms.BboxBase` or None
clip_on: bool
clip_path: Patch or (Path, Transform) or None
constrained_layout: unknown
constrained_layout_pads: unknown
dpi: float
edgecolor: :mpltype:`color`
facecolor: :mpltype:`color`
figheight: float
figure: unknown
figwidth: float
frameon: bool
gid: str
in_layout: bool
label: object
layout_engine: {'constrained', 'compressed', 'tight', 'none', `.LayoutEngine`, None}
linewidth: number
mouseover: bool
path_effects: list of `.AbstractPathEffect`
picker: None or bool or float or callable
rasterized: bool
size_inches: (float, float) or float
sketch_params: (scale: float, length: float, randomness: float)
snap: bool or None
tight_layout: unknown
transform: `~matplotlib.transforms.Transform`
url: str
visible: bool
zorder: float
Vous êtes un professionnel et vous avez besoin d'une formation ?
Calcul scientifique
avec Python
Voir le programme détaillé
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 :