[Date Index]
[Thread Index]
[Author Index]
RE: Don't understand Plot behavior
*To*: mathgroup at smc.vnet.net
*Subject*: [mg39992] RE: [mg39971] Don't understand Plot behavior
*From*: "Wolf, Hartmut" <Hartmut.Wolf at t-systems.com>
*Date*: Fri, 14 Mar 2003 04:45:24 -0500 (EST)
*Sender*: owner-wri-mathgroup at wolfram.com
>-----Original Message-----
>From: Alain Cochard [mailto:al2 at noos.fr]
To: mathgroup at smc.vnet.net
>Sent: Thursday, March 13, 2003 9:04 AM
>To: mathgroup at smc.vnet.net
>Subject: [mg39992] [mg39971] Don't understand Plot behavior
>
>
>
>In[1]:= f[t_]:= D[t , t]
>
>In[2]:= Plot[Evaluate[f[t]] , {t, 0, 1}]
>
>Out[2]= -Graphics- [The plot is fine]
>
>In[3]:= Plot[{Evaluate[f[t]],0} , {t, 0, 1}]
>
> -8
>General::ivar: 4.16667 10 is not a valid variable.
>
>[...]
[...]
>
>Out[3]= -Graphics- [The plot just shows the axes]
>
>In[4]:= harhar=Evaluate[f[t]]; Plot[{harhar,0} , {t, 0, 1}]
>
>Out[4]= -Graphics- [The plot is fine]
>
[...]
>
>Is this behavior normal? Thx in advance.
>
>Alain Cochard
>al2 at noos.fr
>
>
Alain,
Absolutely normal, yes.
Plot[Evaluate[{f[t], 0}], {t, 0, 1}, PlotStyle -> Hue[.7]]
is fine (and is effectively the same as your In[4] example.
Now, what's wrong with Plot[{Evaluate[f[t]],0} , {t, 0, 1}]?
First, as Evaluate is not met at level 1, {Evaluate[f[t]],0} will be
untouched (because of HoldAll attribute of Plot), and the machinery of Plot
begins to start with first value t = 4.16667*^-8.
What happens then? Quite the same as in
In[100]:= Block[{t = 4.16667*^-8}, f[t]]
>From In[100]:=
General::"ivar": "4.16667`*^-8 is not a valid variable."
Out[100]= \[PartialD]\_4.16667`*^-8 4.16667`*^-8
--
Hartmut Wolf
Prev by Date:
**Re: Don't understand Plot behavior**
Next by Date:
**Re: a question about Hazard Rate - HazardRate.nb (1/1)**
Previous by thread:
**Re: Re: Don't understand Plot behavior**
Next by thread:
**Re: Don't understand Plot behavior**
| |