Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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

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 \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?

share|improve this question

closed as off-topic by Artes, rm -rf Feb 1 at 3:13

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Artes, rm -rf
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Just add PlotRange->Full. –  Pickett Jan 22 at 19:50
    
@Pickett It doesn't helped. –  Ziva Jan 22 at 19:55
1  
@picket and closers: PlotRange isn't the issue here. The points Zia is missing (before about k =560) fall within the visible range but are simply not plotted. –  Sjoerd C. de Vries Jan 22 at 20:41

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer
    
Now everything works good. Thank you, from now on I will remember using N[]. –  Ziva Jan 22 at 20:02
1  
@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 at 20:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.