@@ -553,37 +553,39 @@ def set_markevery(self, every):
553
553
(float, float) or list[bool]
554
554
Which markers to plot.
555
555
556
- - every=None, every point will be plotted.
557
- - every=N, every N-th marker will be plotted starting with
556
+ - `` every=None``: every point will be plotted.
557
+ - `` every=N``: every N-th marker will be plotted starting with
558
558
marker 0.
559
- - every=(start, N), every N-th marker, starting at point
560
- start, will be plotted.
561
- - every=slice(start, end, N), every N-th marker, starting at
562
- point start, up to but not including point end, will be plotted.
563
- - every=[i, j, m, n], only markers at points i, j, m, and n
564
- will be plotted.
565
- - every=[True, False, True], positions that are True will be
559
+ - ``every=(start, N)``: every N-th marker, starting at index
560
+ *start*, will be plotted.
561
+ - ``every=slice(start, end, N)``: every N-th marker, starting at
562
+ index *start*, up to but not including index *end*, will be
566
563
plotted.
567
- - every=0.1, (i.e. a float) then markers will be spaced at
568
- approximately equal distances along the line; the distance
564
+ - ``every=[i, j, m, ...]``: only markers at the given indices
565
+ will be plotted.
566
+ - ``every=[True, False, True, ...]``: only positions that are True
567
+ will be plotted. The list must have the same length as the data
568
+ points.
569
+ - ``every=0.1``, (i.e. a float): markers will be spaced at
570
+ approximately equal visual distances along the line; the distance
569
571
along the line between markers is determined by multiplying the
570
572
display-coordinate distance of the axes bounding-box diagonal
571
- by the value of every.
572
- - every=(0.5, 0.1) (i.e. a length-2 tuple of float), the same
573
- functionality as every=0.1 is exhibited but the first marker will
574
- be 0.5 multiplied by the display-coordinate-diagonal-distance
575
- along the line.
573
+ by the value of * every* .
574
+ - `` every=(0.5, 0.1)`` (i.e. a length-2 tuple of float): similar
575
+ to `` every=0.1`` but the first marker will be offset along the
576
+ line by 0.5 multiplied by the
577
+ display-coordinate-diagonal-distance along the line.
576
578
577
579
For examples see
578
580
:doc:`/gallery/lines_bars_and_markers/markevery_demo`.
579
581
580
582
Notes
581
583
-----
582
- Setting the markevery property will only show markers at actual data
583
- points. When using float arguments to set the markevery property
584
- on irregularly spaced data, the markers will likely not appear evenly
585
- spaced because the actual data points do not coincide with the
586
- theoretical spacing between markers .
584
+ Setting * markevery* will still only draw markers at actual data points.
585
+ While the float argument form aims for uniform visual spacing, it has
586
+ to coerce from the ideal spacing to the nearest available data point.
587
+ Depending on the number and distribution of data points, the result
588
+ may still not look evenly spaced .
587
589
588
590
When using a start offset to specify the first marker, the offset will
589
591
be from the first data point which may be different from the first
0 commit comments