RE: Re: Plot question
- To: mathgroup at smc.vnet.net
- Subject: [mg80975] RE: [mg80920] Re: [mg80840] Plot question
- From: "Tony Harker" <a.harker at ucl.ac.uk>
- Date: Thu, 6 Sep 2007 05:38:43 -0400 (EDT)
I still don't understand this. I can see that the HoldAll attribute means that Mathematica doesn't know before it starts the plotting that it really has three things to plot, but I don't see why this in some way overrides the option that says that, whatever is plotted, the first plot should be in Red etc. At what stage is the information in the option jettisoned? As a supplementary, can you give an example in which wrapping the first argument of Plot in Evaluate causes problems? Tony ]-> -----Original Message----- ]-> From: Bob Hanlon [mailto:hanlonr at cox.net] ]-> Sent: 05 September 2007 08:01 ]-> To: mathgroup at smc.vnet.net ]-> Subject: [mg80920] Re: [mg80840] Plot question ]-> ]-> 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}] ]-> > ]-> > ]-> ]-> ]->