Re: 4 Straight segments !!
- To: mathgroup at smc.vnet.net
- Subject: [mg38856] Re: 4 Straight segments !!
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Thu, 16 Jan 2003 03:19:46 -0500 (EST)
- References: <b00rcr$pm0$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Payton, The following works for the example used: Plot[x^2,{x,-2,2},PlotPoints->3,PlotDivision->1] But you will see that the plot is not symmetrical (this is probably due to small adjustments in the initial sample points to lessen the chances of aliasing). If you want to have complete control then you might try using Table and ListPlot: SegmentPlot[f_, {x_,xmin_, xmax_, n_}, opts___?OptionQ]:= ListPlot[Table[{x,f},{x,xmin, xmax, (xmax-xmin)/n}], opts] SegmentPlot[x^2,{x, -2,2, 4}, PlotJoined->True] Or you could construct your own graphics. "Payton" <payton_200 at yahoo.fr> wrote in message news:b00rcr$pm0$1 at smc.vnet.net... > How can I adjust the Plot options PlotPoints,PlotDivision and MaxBend > so that the graph of f(x) = x^2 consists of exactly four straight > segments. >