# Is there a simpler way to plot less points?

**URL:** <https://discourse.julialang.org/t/is-there-a-simpler-way-to-plot-less-points/75786>\
**Category:** General Usage\
**Tags:** question, plotting, plots, recipe\
**Created:** [February 4, 2022, 11:04am UTC](https://discourse.julialang.org/t/is-there-a-simpler-way-to-plot-less-points/75786 "2022-02-04T11:04:10Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [February 4, 2022, 1:27pm UTC](https://discourse.julialang.org/t/is-there-a-simpler-way-to-plot-less-points/75786/6 "2022-02-04T13:27:15Z")

</div>

> [@lmiq](#):
>
> You can use for example `x[begin:2:end]` to sample every 2 points

One nice feature would be to be able to control the spacing of marker symbols (circles, squares, etcetera) independently from the density of the data (used to plot the lines). This is useful if you are using the markers only as labels, not to indicate data, and want to have sparse markers with smooth curves.

You can achieve this if you first plot the full data as a line, and then plot subsampled data as markers. But that makes setting up a legend difficult because the plotting software thinks you have two separate curves. It’s also inconvenient if you have unequally spaced data but want equally spaced markers.

Many years ago (2004, whew), I contributed a patch to [Grace 6](https://plasma-gate.weizmann.ac.il/Grace/) to add a “minimum symbol separation” feature precisely for these reasons; it’s pretty trivial to implement at the low level. (It looks like Grace development halted, sadly … Grace 6 is still only available as a “5.99” beta.)

---

_[View the full topic](https://discourse.julialang.org/t/is-there-a-simpler-way-to-plot-less-points/75786)._
