ListPlot doesn’t shows all points [closed]

I have a table:
p1 = Table[(Binomial[2000, k]*StirlingS2[1386, k]*k!)/(2000^1386), {k, 1, 1386,

I used ListPlot[p1] to draw a plot of this values. This is the plot, where on Y I have values of p1 and on X I have values of k. But when I draw my plot, I see only points which are starting from k≈560k \approx 560. Why I can’t see points for all values of k?
Is this because of that values for small k are too small?
How can I fix that?



1 Answer


You need to evaluate numerically the points, using N[]. Morevoer, I always suggest you to use the PlotRange->All option for ListPlot. Here is the code:

p1 = Table[(Binomial[2000, k]*StirlingS2[1386, k]*k!)/(2000^1386), {k,1, 1386, 1}]

ListPlot[p1 // N, PlotRange -> All]

This shows all the values starting from k=1.



Now everything works good. Thank you, from now on I will remember using N[].
– Ziva
Jan 22 ’14 at 20:02



@ziva Usually, ListPlot works just fine without N, but the numbers in your table are a bit extreme (just have a look at p[[1]] and p[[800]]) and I think ListPlot removes the smallest/most hopeless cases. Cases[ListPlot[p1, PlotRange -> All], Point[p___] :> Length@p, Infinity] shows that there are 849 points in the arbitrary precision plot. If you use p1//N in the above you’ll see you have 1386 points instead.
– Sjoerd C. de Vries
Jan 22 ’14 at 20:32