MathGroup Archive 2000

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

Search the Archive

Re: Evaluation of functions inside Plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg22060] Re: Evaluation of functions inside Plot
  • From: Daniel Duque Campayo <campayo at phys.washington.edu>
  • Date: Fri, 11 Feb 2000 02:38:45 -0500 (EST)
  • Organization: University of Washington
  • References: <87tpki$5iq@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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

Yes, because it should be "y I" in the Arg[], with a space in between.
Mathematica thinks yI is a new (undefined) variable.

Also, you have an extra bracket. So the thing should be
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
 ];

Regards

Dani

PS: About the Evaluate[] thing, I don't understand it so much; it
tipically use it when things go slow and it usually speeds them up.


-- 
Daniel Duque
Dpt. of Physics
University of Washington
Seattle, WA 98195, USA


  • Prev by Date: Re: With plot labels axes disappear. Why?
  • Next by Date: Mathlink and packed arrays
  • Previous by thread: Re: Evaluation of functions inside Plot
  • Next by thread: Re: Evaluation of functions inside Plot