How can I reduce the number of PlotMarkers when I have many points in a ListLinePlot using the PlotTheme “Monochrome”?

For example ListLinePlot[Range[10000], PlotTheme -> "Monochrome"] will show a marker for every point, how can I show a marker just every hundred points?

As of Version 12.1 do not use PlotTheme -> "Monochrome" (see update below)

Taking a sample of the points and then working with Overlay or Show (e.g. mixing ListLinePlot, ListPlot) is a rather cumbersome solution. (Note, that just taking a sample of points, as the quickly accepted answer attempts, will not mark every hundredth point - it simply marks all points in a selection.)

There is a better way to achieve what the OP calls for (e.g. marking a selection of all points) by using Mesh:

SeedRandom["08.01.2019"];
points = RandomVariate[ UniformDistribution[], 50 ];
ListLinePlot[
points,
Mesh -> 30, (* setting this to 50-2 = 48 will give all points *)
PlotTheme -> "Monochrome"
]


Playing around with the number of points used for Mesh gives the idea:

So for completeness' sake using Mesh the solution to the OP's problem is approximately:

ListLinePlot[Range[10000], Mesh -> (10000/100), PlotTheme -> "Monochrome"]


UPDATE:

It seems that some things are broken in Version 12.1 as my solution will not work out (@XinBae points out, that earlier Versions had similiar issues).

I found the culprit: It is PlotTheme -> "Monochrome" which seems to break Mesh.

Compare the following output:

SeedRandom["08.01.2019"];
points = Sort@RandomVariate[UniformDistribution[], 50];
GraphicsRow@{
ListLinePlot[points, Mesh -> 2, PlotTheme -> "Detailed"],
ListLinePlot[points, Mesh -> 2, PlotTheme -> "Monochrome"]
}


• @xin pei Note, that the topology of the plot is not affected. You called for less "Markers" not less "Points"! – gwr Jan 8 '19 at 10:55
• Yes... Your answer is better – XinBae Jan 9 '19 at 2:20
• So why is this answer downvoted? Someone angry because of COVID-19? ;-) – gwr May 25 '20 at 18:33
• Maybe not the COVID-19. This method fails in version 12.1... In fact, in some previous versions, the mesh option also failed @gwr – XinBae Jun 2 '20 at 1:06
• @XinBae I see. The culprit is PlotTheme -> "Monochrome" see my update. – gwr Jun 2 '20 at 18:05

This will do it:

ListLinePlot[Range[10000][[1;;-1;;100]], PlotTheme -> "Monochrome"]


The [[1;;-1;;100]] part specification picks one element every 100 elements.

• Yes, it is. This will work for any list. – mmeent Jan 8 '19 at 8:13
• OP wants less marks but not less points. – gwr Jan 8 '19 at 8:17
• @gwr You can always make two plots and combine them with Show - one ListLinePlot without markers, and one ListPlot employing this solution to get a marker every 100 points – Lukas Lang Jan 8 '19 at 8:18
• @gwr What I meant is that you make the ListLinePlot with all data points, and only the ListPlot with the subset. Or do you mean something else? – Lukas Lang Jan 8 '19 at 8:25
• @LukasLang I am saying, that your suggestion will work but I am addressing this answer and it will not work in general. That is all. – gwr Jan 8 '19 at 8:26