[Date Index]
[Thread Index]
[Author Index]
Re: PlotPoints in plot
*To*: mathgroup at smc.vnet.net
*Subject*: [mg48581] Re: [mg48520] PlotPoints in plot
*From*: DrBob <drbob at bigfoot.com>
*Date*: Sat, 5 Jun 2004 07:20:06 -0400 (EDT)
*References*: <200406040849.EAA23664@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
On my machine, at least, the count is 41:
plot = Plot[Sqrt[1 - x^2], {x, -1, 1}, PlotPoints -> 3];
Length@Flatten[Cases[plot, Line[a__] :> a, Infinity], 1]
41
Help documentation on PlotPoints is obviously incorrect (again), or at least misleading (again). An adaptive procedure is used whether you want it or not, obviously. I suspect PlotPoints sets a MINIMUM number of points.
Here's an attempt with only 4 points:
plot = Plot[
Sqrt[1 - x^2], {x, -1, 1}, PlotPoints -> 3, PlotDivision -> 1,
MaxBend -> 90];
Length@Flatten[Cases[plot, Line[a__] :> a, Infinity], 1]
4
Here again, the documentation for MaxBend is incorrect; increasing it should decrease the number of plot points, but...
plot = Plot[
Sqrt[1 - x^2], {x, -1, 1}, PlotPoints -> 3, PlotDivision -> 1,
MaxBend -> 100];
Length@Flatten[Cases[plot, Line[a__] :> a, Infinity], 1]
5
I'm thinking you'll have to pick your points manually, something like this:
Show[Graphics[Line@Table[{x, Sqrt[1 - x^2]}, {x, -1, 1}]]]
DrBob
On Fri, 4 Jun 2004 04:49:37 -0400 (EDT), "G.L.Narasimham" <mathma18 at hotmail.com> wrote:
> For the plot command Plot[Sqrt[1-x^2],{x,-1,1},PlotPoints->3]
> I expected to see a triangle joining 3 points on a circle, but a
> continuous line ( default PlotPoints->20? )appears. However,
> ParametricPlot3D[{Cos[t],Sin[t],0},{t,0,Pi},PlotPoints->3,ViewPoint->{0,0,5}]
> gives a triangle. How to get a polygon of straight sides in the
> unparametered Plot?
>
>
--
DrBob at bigfoot.com
www.eclecticdreams.net/index.html
Prev by Date:
**Re: System of NonLinear Inequalities**
Next by Date:
**Re: DICOM-RT**
Previous by thread:
**PlotPoints in plot**
Next by thread:
**Re: PlotPoints in plot**
| |