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