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}]
>
>