MathGroup Archive 2007

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

Search the Archive

Re: new behavior of Plot


Selwyn Hollis wrote:
> Apologies if this has been mentioned here before and I missed it, but  
> I just accidently discovered that Mathematica 6 has squashed one of  
> the top three FAQs of all time.
> 
> This now works without using Evaluate:
> 
>       fns = Table[Cos[x - c], {c, -1, 1, .2}];
>       Plot[fns, {x, -5, 5}]
> 
> So does this, but all the curves are drawn with the same color:
> 
>      Plot[Table[Cos[x - c], {c, -1, 1, .2}], {x, -5, 5}]

This gets different colors.

Plot[Evaluate[Table[Cos[x - c], {c, -1, 1, .2}]], {x, -5, 5}]


> This is all rather mysterious, since Plot still has the attribute  
> HoldAll.
> 
> Can anyone explain?



-- 
Helen Read
University of Vermont


  • Prev by Date: Re: Rotable Graphics and ViewPoint
  • Next by Date: Re: replacing expressions
  • Previous by thread: new behavior of Plot
  • Next by thread: Re: Graphics package in v6