Re: Plot&2backgroundcolors
- To: mathgroup at smc.vnet.net
- Subject: [mg44299] Re: Plot&2backgroundcolors
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 5 Nov 2003 10:00:24 -0500 (EST)
- Organization: Universitaet Leipzig
- References: <bo7nq2$ads$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi, gr = FullGraphics[ Plot[Sin[x], {x, 0, 2Pi}, Frame->True, FrameTicks -> {Table[xi, {xi, 0, 2Pi, Pi/4}], Automatic}, (* set the ticks *) Epilog -> {AbsoluteThickness[2], Line[{{Pi, -1}, {Pi, 1}}]} (* draw the vertical line *) ] ] and add the second background color for x>Pi Show[gr, Prolog -> {GrayLevel[0.9], Rectangle[{Pi, -1}, {2Pi, 1}], GrayLevel[0]}] Regards Jens Roberto Brambilla wrote: > > Hello, > > 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. > > Many thanks in advance, Roberto > > Roberto Brambilla > CESI > Via Rubattino 54 > 20134 Milano > tel +39.02.2125.5875 > fax +39.02.2125.5492 > rlbrambilla at cesi.it