Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*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 2003

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

Search the Archive

RE: Mathematica 5 : strange Plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43985] RE: [mg43945] Mathematica 5 : strange Plot
  • From: "David Park" <djmp at earthlink.net>
  • Date: Thu, 16 Oct 2003 04:16:38 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Pacotomi,

A common question. You need to use the PlotRange option. The default value
is Automatic, in which case Mathematica picks out what it thinks is the most
"interesting" portion of the graph to display. This does not always satisfy.
You PlotRange -> All to show everything or specify specific plot ranges.
Check out PlotRange in Help for full details.

f[x_] := If [x < 20, 0, x - 20]

Plot[f[x], {x, 0, 100},
    PlotRange -> All];


David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/

From: pacotomi [mailto:pacotomi at wanadoo.fr]
To: mathgroup at smc.vnet.net

Hi,
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 ?

Pacotomi


  • Prev by Date: Re: What Happens to Garbage in Mathematica?
  • Next by Date: Something really wrong with FindRoot or NDSolve in Mathematica 5.0
  • Previous by thread: Re: Mathematica 5 : strange Plot
  • Next by thread: RE: Mathematica 5 : strange Plot