Vous êtes un professionnel et vous avez besoin d'une formation ?
Calcul scientifique
avec Python
Voir le programme détaillé
Classe « Axis »
Signature de la méthode set_ticklabels
def set_ticklabels(self, labels, *, minor=False, fontdict=None, **kwargs)
Description
help(Axis.set_ticklabels)
[*Discouraged*] Set this Axis' tick labels with list of string labels.
.. admonition:: Discouraged
The use of this method is discouraged, because of the dependency on
tick positions. In most cases, you'll want to use
``Axes.set_[x/y/z]ticks(positions, labels)`` or ``Axis.set_ticks``
instead.
If you are using this method, you should always fix the tick
positions before, e.g. by using `.Axis.set_ticks` or by explicitly
setting a `~.ticker.FixedLocator`. Otherwise, ticks are free to
move and the labels may end up in unexpected positions.
Parameters
----------
labels : sequence of str or of `.Text`\s
Texts for labeling each tick location in the sequence set by
`.Axis.set_ticks`; the number of labels must match the number of locations.
The labels are used as is, via a `.FixedFormatter` (without further
formatting).
minor : bool
If True, set minor ticks instead of major ticks.
fontdict : dict, optional
.. admonition:: Discouraged
The use of *fontdict* is discouraged. Parameters should be passed as
individual keyword arguments or using dictionary-unpacking
``set_ticklabels(..., **fontdict)``.
A dictionary controlling the appearance of the ticklabels.
The default *fontdict* is::
{'fontsize': rcParams['axes.titlesize'],
'fontweight': rcParams['axes.titleweight'],
'verticalalignment': 'baseline',
'horizontalalignment': loc}
**kwargs
Text properties.
.. warning::
This only sets the properties of the current ticks, which is
only sufficient for static plots.
Ticks are not guaranteed to be persistent. Various operations
can create, delete and modify the Tick instances. There is an
imminent risk that these settings can get lost if you work on
the figure further (including also panning/zooming on a
displayed figure).
Use `.set_tick_params` instead if possible.
Returns
-------
list of `.Text`\s
For each tick, includes ``tick.label1`` if it is visible, then
``tick.label2`` if it is visible, in that order.
Vous êtes un professionnel et vous avez besoin d'une formation ?
Sensibilisation àl'Intelligence Artificielle
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 :