Re: PlotStyle in version 6
- To: mathgroup at smc.vnet.net
- Subject: [mg80491] Re: [mg80440] PlotStyle in version 6
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Thu, 23 Aug 2007 01:17:56 -0400 (EDT)
- Reply-to: hanlonr at cox.net
Attributes[Plot]
{HoldAll,Protected}
Plot has the Attribute HoldAll. The presence of ReplaceAll makes the first argument to Plot a single entity at the time that the PlotStyle is set unless you force it to be evaluated first.
vals = {a -> 1};
Plot[Evaluate[{t, 1 + t} /. vals], {t, 0, 10},
PlotStyle -> {{Red, Dashed}, {Blue}}]
Bob Hanlon
---- ben <benjamin.friedrich at gmail.com> wrote:
> Dear all,
>
> Could you please help me pointing out,
> why the following line of code
> produces to curves of the same plotstyle ?
>
> Plot[{t, 1 + t} /. vals, {t, 0, 10},
> PlotStyle -> {{Red, Dashed}, {Blue}}]
>
> Cheers
> Ben
>
>