[Date Index]
[Thread Index]
[Author Index]
RE: In Plot, horizontal range is reduced depending on PlotRange
*To*: mathgroup at smc.vnet.net
*Subject*: [mg49628] RE: [mg49582] In Plot, horizontal range is reduced depending on PlotRange
*From*: "David Park" <djmp at earthlink.net>
*Date*: Sun, 25 Jul 2004 02:55:30 -0400 (EDT)
*Sender*: owner-wri-mathgroup at wolfram.com
Alain,
Actually, my first reply wasn't the best. The simpler solution is just to
use
Plot[Exp[-10000 t^2], {t, 0, 0.04}];
With PlotRange -> Automatic, the default, Mathematica tries to use a
PlotRange that will display the "interesting" part of the plot. It is a
mysterious algorithm that users don't have access to. It can change the x as
well as the y range. It usually does a reasonable job but not always. You
can override it by specifically giving the PlotRange.
It is probably best to first change the domain iterator {t, tmin, tmax} and
then use PlotRange if necessary.
David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/
From: Alain Cochard [mailto:alain at geophysik.uni-muenchen.de]
To: mathgroup at smc.vnet.net
David Park writes:
> Alain,
>
> Is this what you wanted?
>
> Plot[Exp[-10000 t^2], {t, 0, 1}, PlotRange -> {{0, 0.03}, {-.5, 1}}];
>
> If you specify only a single plot range it refers to the vertical
> range.
Yes, this I new, and what I wanted was to have the horizontal range
displayed from 0 to 1. I thought that using {t,0,1} was precisely
supposed to accomplish that (it indeed does it if I don't specify any
PlotRange), and not from 0 to about 0.53, as I described in my initial
message.
Now, using 2 ranges in PlotRange, as you suggest (this, I didn't know)
does want I want:
Plot[Exp[-10000 t^2], {t, 0, 1}, PlotRange -> {{0, 1}, {-.5, 1}}];
So I still have the question: is it normal that Mathematica can overrule my
{t,tmin,tmax} specification. Besides, if, e.g., I use {t,1,2} with
PlotRange -> {-.5,1}, then the horizontal axis is indeed displayed
from 1 to 2 (and this was the first time in years that this happened
to me). In other words, is there a way to know in advance, for a
given choice of {t,tmin,tmax}, what is the {t,tmmamin,tmmamax} Mathematica is
going to use, and what is the rationale behind that.
Many thanks, David.
Alain Cochard
>
> David Park
> djmp at earthlink.net
> http://home.earthlink.net/~djmp/
>
> From: Alain Cochard [mailto:alain at geophysik.uni-muenchen.de]
To: mathgroup at smc.vnet.net
>
>
> Hello. Sorry if this has already been asked; I search the archives a
> bit but could find anything relevant.
>
> Although the command
>
> Plot[Exp[-10000 t^2],{t, 0, 1}, PlotRange -> All]
>
> produces exactly what I expect, the following one produces a plot
> where the horizontal axis is from 0 to about 0.53 only:
>
> Plot[Exp[-10000 t^2],{t, 0, 1},PlotRange ->{-.5,1}]
>
> I have $Version:
>
> Out[334]= 4.0 for Linux (July 22, 1999)
>
> If this is normal, what am I missing? In any case, how can display
> with a prescribed horizontal range?
>
> Thanks,
> Alain
>
>
>
>
Prev by Date:
**Re: AW: Fundamental theorem problem**
Next by Date:
**Re: Fibonacci [5,000,000] contains 1044938 decimal digits**
Previous by thread:
**RE: In Plot, horizontal range is reduced depending on PlotRange**
Next by thread:
**Re: In Plot, horizontal range is reduced depending on PlotRange**
| |