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

MathGroup Archive 2007

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

Search the Archive

Re: Plot question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80920] Re: [mg80840] Plot question
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Wed, 5 Sep 2007 03:00:45 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

Because Plot has the Attribute HoldAll. Use Evaluate.

Attributes[Plot]

{HoldAll,Protected}

Plot[Evaluate[{a x, 2 a x, 3 a x} /. a -> 2], {x, 1, 2}, 
 PlotStyle -> {Red, Green, Blue}]


Bob Hanlon

---- Yaroslav Bulatov <yaroslavvb at gmail.com> wrote: 
> Why does the plot below make all 3 curves the same color?
> 
> Plot[{a x, 2 a x, 3 a x} /. a -> 2, {x, 1, 2},
>  PlotStyle -> {Red, Green, Blue}]
> 
> 



  • Prev by Date: Re: Fwd: correction to: more than 1.5 hrs of trying: Grid Alignment problem ?
  • Next by Date: Re: Unevaluated hypergeometric functions
  • Previous by thread: Re: Plot question
  • Next by thread: RE: Plot question