Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: PlotPoints in plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg48549] Re: PlotPoints in plot
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Sat, 5 Jun 2004 07:18:50 -0400 (EDT)
  • Organization: The University of Western Australia
  • References: <c9pe8k$psr$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <c9pe8k$psr$1 at smc.vnet.net>,
 mathma18 at hotmail.com ("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}];

Cheers,
Paul

-- 
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 physics.uwa.edu.au 
AUSTRALIA                            http://physics.uwa.edu.au/~paul


  • 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