Re: PlotPoints Question
- To: mathgroup at smc.vnet.net
- Subject: [mg13477] Re: PlotPoints Question
- From: Arnoud Buzing <arnoudb>
- Date: Sun, 26 Jul 1998 02:33:37 -0400
- Organization: Wolfram Research, Inc.
- References: <6p98ec$b82@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Kevin J. McCann wrote: > > I wrote a routine the other day to display the points that Plot actually > uses. Much to my surprise, when I set PlotPoints to some number like 5, > I found that more than this number were actually used. > > For example, try this > > p1 = Plot[x^2, {x, 0, 2}, PlotPoints ->5, PlotRange ->All]; > > and then to > > p1//FullForm > > You will see that 19 points are actually used. Given all that, what does > the PlotPoints option really do? > > Kevin I hope this helps a little bit: The PlotPoints option does not specify the number of points to use, but the minimum number of points to use by Plot. If you want to bring the number of sampled points more into agreement with PlotPoints you can lower the option PlotDivision to 1.0 (default 20.0). The last option that affects the actual number of sampled points is MaxBend, (default 10.0 degrees) which helps to keep the angle between succesive segments small. See also section 1.9.3 Graphics and Sound Options. --- Arnoud P.S: Try Table[{i,Length[Plot[x^2, {x, 0, 2}, PlotPoints ->i,PlotRange->All, DisplayFunction->Identity,PlotDivision->1.0][[1,1,1,1]]]},{i,2,100}] for a comparison between the number of points specified in PlotPoints and the actual number of sampled points.