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