Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Evaluation of functions inside Plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg21993] Evaluation of functions inside Plot
  • From: Hans-Peter Kunzle <HP.Kunzle at UAlberta.ca>
  • Date: Thu, 10 Feb 2000 02:25:36 -0500 (EST)
  • Organization: University of Alberta
  • Sender: owner-wri-mathgroup at wolfram.com

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: global real variables
  • Next by Date: Re: ErrorListPlot point size control?
  • Previous by thread: Re: global real variables
  • Next by thread: Re: Evaluation of functions inside Plot