MathGroup Archive 2003

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

Search the Archive

Re: Mathematica 5 : strange Plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43975] Re: [mg43945] Mathematica 5 : strange Plot
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Thu, 16 Oct 2003 04:16:09 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On Wednesday, October 15, 2003, at 05:59 PM, pacotomi wrote:

> 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
>
>
>

You should tell mathemaitca the plot range you want:

1.

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

2.
Plot[f[x], {x, 0, 100}, PlotRange -> {{0, 100}, {0, 80}}]

Otherwise Mathematica uses it's own algorithm for choosing the 
"interesting" plot range, which often produces better looking pictures 
but is not always what you want.





Andrzej Kozlowski
Yokohama, Japan
http://www.mimuw.edu.pl/~akoz/
http://platon.c.u-tokyo.ac.jp/andrzej/


  • Prev by Date: Re: What is the limit of x Gamma[n,x] for x->Infinity?
  • Next by Date: Re: What Happens to Garbage in Mathematica?
  • Previous by thread: Re: Mathematica 5 : strange Plot
  • Next by thread: RE: Mathematica 5 : strange Plot