Re: Evaluation of functions inside Plot

• To: mathgroup at smc.vnet.net
• Subject: [mg22042] Re: Evaluation of functions inside Plot
• From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
• Date: Fri, 11 Feb 2000 02:38:23 -0500 (EST)
• Organization: Universitaet Leipzig
• References: <87tpki\$5iq@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Hi,

first of all you should try to type your commands correctly.
a)

> Plot3D[
>   { Abs[x+y I], Hue[ N[(Pi+Arg[x + yI]) /(2 Pi)]]},
>   {x,-2,2},{y,-2,2}],
>   AxesLabel->{"Re","Im","Abs[z]"},PlotPoints->15
> ];

has a a "]" behind the {y,-2,2} that close the Plot3D[] function.

b)  yI is one symbol and n_o_t y*I or y I

The command:

Plot3D[{Abs[x + y I], Hue[N[(Pi + Arg[x + y I])/(2 Pi)]]}, {x, -2, 2},
{y, -2,
2}, AxesLabel -> {"Re", "Im", "Abs[z]"}, PlotPoints -> 15];

works fine.

Regards
Jens

Hans-Peter Kunzle wrote:
>
> I still do not understand well enough how expressions get
> evaluated inside a Plot or similar functions (NDSolve etc.).
>
> This time I copied the code directly from the (quite old)
> book by T.W. Gray and J. Glynn, Exploring Mathematics with
> Mathematica (p.142):
>
> Plot3D[
>   { Abs[x+y I], Hue[ N[(Pi+Arg[x + yI]) /(2 Pi)]]},
>   {x,-2,2},{y,-2,2}],
>   AxesLabel->{"Re","Im","Abs[z]"},PlotPoints->15
> ];
>
> This produces several error messages
>
> Plot3D::plnc:
>     {Abs[x + y I], Hue[(N[([Pi] + Arg[x + yI])\(2 Pi)]]} is neither a
>     machine-size real number at {x,y}={-2.,-2.} nor a list of a real number
>     and a \alid color directive.
>
> This book was written for Mathematica 2, of course, and presumably
> the code must have worked then. Has anything changed since then?
>
> I have tried to wrap 'Evaluate' around some of the expressions, but
> this had no effect. Since Abs and Arg only work for numerical
> arguments I also tried to replace them by explicit expressions in
> x and y. But this did not help either.
>
> Any help is appreciated.
>
> Hans
> --
> H.P. Künzle                    | Office: (780)492-3798,492-3396
> Dept. of Mathematical Sciences | Fax:    (780)492-6826
> University of Alberta          | E-mail: HP.Kunzle at UAlberta.ca
> Edmonton, Canada T6G 2G1 | WWW:http://www.math.ualberta.ca/~hpk

```

• Prev by Date: Re: Re: Re: Set in Scan
• Next by Date: re: Orientation of characters in FrameLabel
• Previous by thread: Re: Evaluation of functions inside Plot
• Next by thread: Re: Evaluation of functions inside Plot