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 ? Coder avec une
Intelligence Artificielle
Voir le programme détaillé
Module « matplotlib.pyplot »

Fonction locator_params - module matplotlib.pyplot

Signature de la fonction locator_params

def locator_params(axis: "Literal['both', 'x', 'y']" = 'both', tight: 'bool | None' = None, **kwargs) -> 'None' 

Description

help(matplotlib.pyplot.locator_params)

Control behavior of major tick locators.

Because the locator is involved in autoscaling, `~.Axes.autoscale_view`
is called automatically after the parameters are changed.

Parameters
----------
axis : {'both', 'x', 'y'}, default: 'both'
    The axis on which to operate.  (For 3D Axes, *axis* can also be
    set to 'z', and 'both' refers to all three axes.)
tight : bool or None, optional
    Parameter passed to `~.Axes.autoscale_view`.
    Default is None, for no change.

Other Parameters
----------------
**kwargs
    Remaining keyword arguments are passed to directly to the
    ``set_params()`` method of the locator. Supported keywords depend
    on the type of the locator. See for example
    `~.ticker.MaxNLocator.set_params` for the `.ticker.MaxNLocator`
    used by default for linear.

Notes
-----

.. note::

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

Examples
--------
When plotting small subplots, one might want to reduce the maximum
number of ticks and use tight bounds, for example::

    ax.locator_params(tight=True, nbins=4)


Vous êtes un professionnel et vous avez besoin d'une formation ? Sensibilisation à
l'Intelligence Artificielle
Voir le programme détaillé