Vous êtes un professionnel et vous avez besoin d'une formation ?
Programmation Python
Les fondamentaux
Voir le programme détaillé
Classe « Line2D »
Signature de la méthode set_markevery
def set_markevery(self, every)
Description
help(Line2D.set_markevery)
Set the markevery property to subsample the plot when using markers.
e.g., if ``every=5``, every 5-th marker will be plotted.
Parameters
----------
every : None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool]
Which markers to plot.
- ``every=None``: every point will be plotted.
- ``every=N``: every N-th marker will be plotted starting with
marker 0.
- ``every=(start, N)``: every N-th marker, starting at index
*start*, will be plotted.
- ``every=slice(start, end, N)``: every N-th marker, starting at
index *start*, up to but not including index *end*, will be
plotted.
- ``every=[i, j, m, ...]``: only markers at the given indices
will be plotted.
- ``every=[True, False, True, ...]``: only positions that are True
will be plotted. The list must have the same length as the data
points.
- ``every=0.1``, (i.e. a float): markers will be spaced at
approximately equal visual distances along the line; the distance
along the line between markers is determined by multiplying the
display-coordinate distance of the Axes bounding-box diagonal
by the value of *every*.
- ``every=(0.5, 0.1)`` (i.e. a length-2 tuple of float): similar
to ``every=0.1`` but the first marker will be offset along the
line by 0.5 multiplied by the
display-coordinate-diagonal-distance along the line.
For examples see
:doc:`/gallery/lines_bars_and_markers/markevery_demo`.
Notes
-----
Setting *markevery* will still only draw markers at actual data points.
While the float argument form aims for uniform visual spacing, it has
to coerce from the ideal spacing to the nearest available data point.
Depending on the number and distribution of data points, the result
may still not look evenly spaced.
When using a start offset to specify the first marker, the offset will
be from the first data point which may be different from the first
the visible data point if the plot is zoomed in.
If zooming in on a plot when using float arguments then the actual
data points that have markers will change because the distance between
markers is always determined from the display-coordinates
axes-bounding-box-diagonal regardless of the actual axes data limits.
Vous êtes un professionnel et vous avez besoin d'une formation ?
RAG (Retrieval-Augmented Generation)et Fine Tuning d'un LLM
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 :