Re: change PlotStyle in Graphics object after the fact?
- To: mathgroup at smc.vnet.net
- Subject: [mg47288] Re: [mg47253] change PlotStyle in Graphics object after the fact?
- From: Tomas Garza <tgarza01 at prodigy.net.mx>
- Date: Fri, 2 Apr 2004 03:30:51 -0500 (EST)
- References: <200404010503.AAA28327@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Perhaps something like this would help:
In[1]:=
p1 = Plot[Sin[x], {x, -Pi, Pi}];
In[2]:=
p2 = p1 /. (GridLines -> None) -> GridLines ->
Automatic;
In[3]:=
Show[p2]
You'll have to replace the whole option by the new one, not just its name.
Tomas Garza
Mexico City
----- Original Message -----
From: "jose flanigan" <jflanigan at netzero.net>
To: mathgroup at smc.vnet.net
Subject: [mg47288] [mg47253] change PlotStyle in Graphics object after the fact?
> Hi,
>
> I have a number of graphics objects created like
>
> p1=Plot[f[x],{x,-1,1}]
> p2=Plot[g[x], {x,-1,2}]
>
> and I was wondering if I can change the PlotStyle on p1 and p2 by
> doing something like
>
> p2/.PlotStyle->{new plot style options}
>
> Any ideas?
>
> Thanks in advance.
>
> PS. Please reply to this group. Spammers have destroyed this e-mail
> address.
>
>