# Plotting using IntegerListPlot [duplicate]

This question already has an answer here:

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],
PlotStyle -> Black], IntegerListPlot[RiemannFSum /@ Range]}], 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?

## marked as duplicate by Mike Honeychurch, Sjoerd C. de Vries, Artes, Dr. belisarius, rm -rf♦Nov 21 '13 at 2:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

## 2 Answers

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},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