MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: PlotPoints in plot

  • To: mathgroup at
  • Subject: [mg48549] Re: PlotPoints in plot
  • From: Paul Abbott <paul at>
  • Date: Sat, 5 Jun 2004 07:18:50 -0400 (EDT)
  • Organization: The University of Western Australia
  • References: <c9pe8k$psr$>
  • Sender: owner-wri-mathgroup at

In article <c9pe8k$psr$1 at>,
 mathma18 at ("G.L.Narasimham") 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?

I am struggling to understand _why_ you would want to do this?

Anyway, I don't think that it is possible to do this using Plot 
_directly_ because of restrictions on PlotPoints (and PlotDivision). The 
closest I can get is to use the PlotDivision option:

 Plot[Sqrt[1 - x^2], {x, -1, 1}, PlotPoints -> 3, PlotDivision -> 1]

However, this is not quite what you want. Alternatively,

   int = Interpolation[Table[{x, Sqrt[1 - x^2]}, {x, -1, 1}], 
      InterpolationOrder -> 1]

   Plot[int[x], {x, -1, 1}];


Paul Abbott                                   Phone: +61 8 9380 2734
School of Physics, M013                         Fax: +61 8 9380 1014
The University of Western Australia      (CRICOS Provider No 00126G)         
35 Stirling Highway
Crawley WA 6009                      mailto:paul at 

  • Prev by Date: symbolic constrained minimization -- Minimize/Reduce don't work
  • Next by Date: Re: System of NonLinear Inequalities
  • Previous by thread: Re: PlotPoints in plot
  • Next by thread: Re: PlotPoints in plot