       Re: Don't understand Plot behavior

• To: mathgroup at smc.vnet.net
• Subject: [mg39994] Re: [mg39971] Don't understand Plot behavior
• From: Ken Levasseur <klevasseur at mac.com>
• Date: Fri, 14 Mar 2003 04:45:32 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```Alain:

Evaluate needs to be at the top level of the first argument of plot to have
the effect that it has in your first example.

I had defined f=#^2& earlier.

This is what happens in your first example
In:=
Hold[Evaluate[f[t]]]

Out=
Hold[t^2]

Now the second:
In:=
Hold[{Evaluate[f[t]], 0}]

Out=
Hold[{Evaluate[f[t]], 0}]

If you rearrange the the expression, you get what you want:

In:=
Hold[Evaluate[{f[t], 0}]]

Out=
Hold[{t^2, 0}]

Ken Levasseur
UMass Lowell

> From: Alain Cochard <al2 at noos.fr>
To: mathgroup at smc.vnet.net
> Date: Thu, 13 Mar 2003 03:03:58 -0500 (EST)
> To: mathgroup at smc.vnet.net
> Subject: [mg39994] [mg39971] Don't understand Plot behavior
>
>
> In:= f[t_]:= D[t  , t]
>
> In:= Plot[Evaluate[f[t]] , {t, 0, 1}]
>
> Out= -Graphics-    [The plot is fine]
>
> In:= Plot[{Evaluate[f[t]],0} , {t, 0, 1}]
>
> -8
> General::ivar: 4.16667 10   is not a valid variable.
>
> [...]
>
> General::stop: Further output of General::ivar
> will be suppressed during this calculation.
>
> Plot::plnr: Evaluate[f[t]] is not a machine-size real number at t =
> -8
> 4.16667 10  .
>
> [...]
>
> General::stop: Further output of Plot::plnr
> will be suppressed during this calculation.
>
> Out= -Graphics- [The plot just shows the axes]
>
> In:= harhar=Evaluate[f[t]]; Plot[{harhar,0} , {t, 0, 1}]
>
> Out= -Graphics- [The plot is fine]
>
> In:= \$Version
>
> Out= 4.1 for Sun Solaris (November 8, 2000)
>
>
> Is this behavior normal?  Thx in advance.
>
> Alain Cochard
> al2 at noos.fr
>
>

```

• Prev by Date: Re: Don't understand Plot behavior
• Next by Date: Re: My students and I need your help...
• Previous by thread: Re: Don't understand Plot behavior
• Next by thread: Running Mathematica in Kernel mode (UNIX)