# Plotting using IntegerListPlot [duplicate]

I can't seem to implement IntegerListPlot, or find anything about it in the documentation. I can only assume it a custom function.

It comes from this link. I downloaded the Mathematica notebook, but can't seem to replicate the plot. Here is the code used:

RiemannFSum[x_?NumericQ] := Total[PrimePi[x^(1/#)]/# & /@ Range[Floor[Log[2, x]]]]

Show[Block[{\$DisplayFunction = Identity}, {IntegerListPlot[PrimePi[Range[50]],
PlotStyle -> Black], IntegerListPlot[RiemannFSum /@ Range[50]]}], AxesLabel ->
TraditionalForm /@ {x, {StyleForm[HoldForm[f[x]], FontColor -> Red],
StyleForm[PrimePi[x], FontColor -> Black]}}]


which should generate this:

For me though, it just generates an error message. Using ListPlot works, but is not the desired result:

Am I missing something?

This will work! Please have a look at DiscretePlot in the doc.

RiemannFSum[x_?NumericQ] := Total[PrimePi[x^(1/#)]/# & /@ Range[Floor[Log[2, x]]]];
With[{int = Range[50]},ListLinePlot[{RiemannFSum /@ int, PrimePi[int]},
InterpolationOrder -> 0, PlotStyle -> {Red, Black},AxesLabel ->
(TraditionalForm /@ {x,Row@{StyleForm[HoldForm[f[x]], FontColor -> Red], ",",
StyleForm[PrimePi[x], FontColor -> Black]}})]]


• Many thanks for your solution - works great :) – martin Nov 20 '13 at 10:20

Why don't you use the answer that Sjoerd C. de Vries gave you?

intplot[f_, max_, min_: 1] := Riffle[Table[{x, f[x]}, {x, min, max}],
Table[{x + 1, f[x]}, {x, min, max}]];

RiemannFSum[x_?NumericQ] := Total[PrimePi[x^(1/#)]/# & /@ Range[Floor[Log[2, x]]]]

ListPlot[{intplot[RiemannFSum, 50], intplot[PrimePi, 50]}, Joined -> True]


• Yes, I have just realised that I could have applied that principle here :o – martin Nov 20 '13 at 10:20