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 ? Mise en oeuvre d'IHM
avec Qt et PySide6
Voir le programme détaillé
Module « matplotlib.pyplot »

Fonction axis - module matplotlib.pyplot

Signature de la fonction axis

def axis(arg: 'tuple[float, float, float, float] | bool | str | None' = None, /, *, emit: 'bool' = True, **kwargs) -> 'tuple[float, float, float, float]' 

Description

help(matplotlib.pyplot.axis)

Convenience method to get or set some axis properties.

Call signatures::

  xmin, xmax, ymin, ymax = axis()
  xmin, xmax, ymin, ymax = axis([xmin, xmax, ymin, ymax])
  xmin, xmax, ymin, ymax = axis(option)
  xmin, xmax, ymin, ymax = axis(**kwargs)

Parameters
----------
xmin, xmax, ymin, ymax : float, optional
    The axis limits to be set.  This can also be achieved using ::

        ax.set(xlim=(xmin, xmax), ylim=(ymin, ymax))

option : bool or str
    If a bool, turns axis lines and labels on or off. If a string,
    possible values are:

    ================ ===========================================================
    Value            Description
    ================ ===========================================================
    'off' or `False` Hide all axis decorations, i.e. axis labels, spines,
                     tick marks, tick labels, and grid lines.
                     This is the same as `~.Axes.set_axis_off()`.
    'on' or `True`   Do not hide all axis decorations, i.e. axis labels, spines,
                     tick marks, tick labels, and grid lines.
                     This is the same as `~.Axes.set_axis_on()`.
    'equal'          Set equal scaling (i.e., make circles circular) by
                     changing the axis limits. This is the same as
                     ``ax.set_aspect('equal', adjustable='datalim')``.
                     Explicit data limits may not be respected in this case.
    'scaled'         Set equal scaling (i.e., make circles circular) by
                     changing dimensions of the plot box. This is the same as
                     ``ax.set_aspect('equal', adjustable='box', anchor='C')``.
                     Additionally, further autoscaling will be disabled.
    'tight'          Set limits just large enough to show all data, then
                     disable further autoscaling.
    'auto'           Automatic scaling (fill plot box with data).
    'image'          'scaled' with axis limits equal to data limits.
    'square'         Square plot; similar to 'scaled', but initially forcing
                     ``xmax-xmin == ymax-ymin``.
    ================ ===========================================================

emit : bool, default: True
    Whether observers are notified of the axis limit change.
    This option is passed on to `~.Axes.set_xlim` and
    `~.Axes.set_ylim`.

Returns
-------
xmin, xmax, ymin, ymax : float
    The axis limits.

See Also
--------
matplotlib.axes.Axes.set_xlim
matplotlib.axes.Axes.set_ylim

Notes
-----

.. note::

    This is the :ref:`pyplot wrapper <pyplot_interface>` for `.axes.Axes.axis`.

For 3D Axes, this method additionally takes *zmin*, *zmax* as
parameters and likewise returns them.


Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les compléments
Voir le programme détaillé