Re: Plot curiousities ...
- To: mathgroup at christensen.Cybernetics.NET
- Subject: [mg329] Re: [mg314] Plot curiousities ...
- From: "Dennis M. Schneider" <dschneid at knox.edu>
- Date: Tue, 13 Dec 1994 11:37:16 -0600 (CST)
The problem is caused by the fact that Plot has attributes HoldAll. Try Plot[ Power[ x, Range[ 3 ]] // Evaluate, { x, 0, 3 }] A good working rule is that if you are going to construct the object you intend to plot within the Plot command, hang an Evaluate around the object. Dennis Schneider Knox College On Sun, 11 Dec 1994, Dave Shreiner wrote: > Hi, > > Plot[] seems to be a little contrary at the moment. Perhaps, its too late, > and I'm missing something, but Plot[] seems to be very picky about which lists > its willing to execute. For example, consider the following session, > > > [10] math > > Mathematica 2.2 for SGI > > Copyright 1988-93 Wolfram Research, Inc. > > -- Motif graphics initialized -- > > > > In[1]:= $Version > > > > Out[1]= SGI 2.2 (December 22, 1993) > > > > In[2]:= Plot[ { x, x^2, x^3 }, { x, 0, 3 }] > > > > Out[2]= -Graphics- > > Here, I actually get a window with the plots in it. > > > In[3]:= Plot[ Power[ x, Range[ 3 ]] // Flatten, { x, 0, 3 }] > > > > Plot::plnr: CompiledFunction[{x}, Flatten[<<1>>], -CompiledCode-][x] > > is not a machine-size real number at x = 0.. > > > > Plot::plnr: CompiledFunction[{x}, Flatten[<<1>>], -CompiledCode-][x] > > is not a machine-size real number at x = 0.125. > > > > Plot::plnr: CompiledFunction[{x}, Flatten[<<1>>], -CompiledCode-][x] > > is not a machine-size real number at x = 0.25. > > > > General::stop: Further output of Plot::plnr > > will be suppressed during this calculation. > > > > Out[3]= -Graphics- > > Here, I get an empty plot window, as expected from the messages. > > > In[4]:= Power[ x, Range[ 3 ]] // Flatten > > > > 2 3 > > Out[4]= {x, x , x } > > However, this list seems to be identical to the one that I hand entered. > An undocumented feature, perhaps? This certainly isn't a critical problem, but > I would like to know if I'm the cause of the problem. > > Thanks for any assistance. > > > -- > > Thanx, > Dave > > --------------------------------------------------------------------------- > > Dave Shreiner <shreiner at sgi.com> > Silicon Graphics, Inc. (301) 572 - 1693 > > Can humanity butt in line for extinction? > > >