Re: Plot&2backgroundcolors
- To: mathgroup at smc.vnet.net
- Subject: [mg44319] Re: Plot&2backgroundcolors
- From: bobhanlon at aol.com (Bob Hanlon)
- Date: Wed, 5 Nov 2003 10:00:48 -0500 (EST)
- References: <bo7nq2$ads$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Needs["Graphics`Colors`"];
orig=1.234;
Plot[Sin[x], {x,0,Pi},
PlotStyle->{Blue,
AbsoluteDashing[{}]},
Frame->True,
Prolog->{Text[orig, {orig,-0.2}],
Antique,Rectangle[{0, 0}, {orig, 1}],
LightBeige,Rectangle[{orig, 0}, {Pi, 1}],
Red, AbsoluteDashing[{5,5}],
Line[{{orig,0}, {orig,1} }]},
PlotRange->All];
However, if you also want to change the style of the plot in mid stream
Needs["Graphics`Graphics`"];
DisplayTogether[
Plot[Sin[x], {x,0,orig},
PlotStyle->{Green,
AbsoluteDashing[{}]}],
Plot[Sin[x], {x,orig,Pi},
PlotStyle->{Blue,
AbsoluteDashing[{}]}],
Prolog->{Text[orig, {orig,-0.2}],
Antique,Rectangle[{0, 0}, {orig, 1}],
LightBeige,Rectangle[{orig, 0}, {Pi, 1}],
Red, AbsoluteDashing[{5,5}],
Line[{{orig,0}, {orig,1} }]},
PlotRange->All,
Frame->True];
Bob Hanlon
In article <bo7nq2$ads$1 at smc.vnet.net>, Roberto Brambilla <rlbrambilla at cesi.it>
wrote:
<< I have to plot a function, let it be Sin[x] in (0-pg), then I have a
peculiar abscissa, ex. x=1.234.
I'd like to overlap to a normal grid and frame a vertical line at this
abscissa in same different style
(as dash or color or thickness, etc.) . How can I do it?
How can I have also this value explicit as a tick on the plot?
Then all this would be even better if I could have two background colors
(or gray levels),
before and after the selected abscissa.