RE: Mathematica 5 : strange Plot

*To*: mathgroup at smc.vnet.net*Subject*: [mg43983] RE: [mg43945] Mathematica 5 : strange Plot*From*: David.Annetts at csiro.au*Date*: Thu, 16 Oct 2003 04:16:27 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

Hi Pacotomi, > Plot[ ] gives me a perplexing graphic : > > let : > > f[x_] := If [x < 20, 0, x - 20] > > Then, I try : > > Plot[f[x], {x, 0, 100}] > > curiously, I get a plot with x between 0 and 40 and f(x) between 0 and > 80. The x range is false but the y one is right. > > What's wrong with this simple notebook ? Nothing per se. By default (eg section 1.9.1 of online help), Plot tries isolate the most interesting part of the graph. Most recently, this was discussed in [mg43637] -- 2 weeks ago. To see everything, you need to use Plot[f[x], {x, 0, 100}, PlotRange->All]; This can be further customised using Plot[f[x], {x, 0, 100}, PlotRange->{{-20, 120}, All}]; or Plot[f[x], {x, 0, 100}, PlotRange->{All, {-20, 100}]; Regards, Dave. ========================================== Dr. David Annetts EM Modelling Analyst CSIRO DEM Tel: +612 9490 5416 North Ryde Fax: +612 9490 5467 Australia David.Annetts at csiro.au ===========================================