Re: Plot&2backgroundcolors

• To: mathgroup at smc.vnet.net
• Subject: [mg44342] Re: [mg44262] Plot&2backgroundcolors
• From: Tomas Garza <tgarza01 at prodigy.net.mx>
• Date: Wed, 5 Nov 2003 10:02:01 -0500 (EST)
• References: <200311040823.DAA10407@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```It's a good idea to play around a little with graphics primitives and
directives, so as to become familiar with these things. For example, the
following could be a first approach to your question:

In[1]:=
p1 = Plot[Sin[x], {x, 0, 1.234}, DisplayFunction ->
Identity];

In[2]:=
p2 = Plot[Sin[x], {x, 1.234, Pi}, DisplayFunction ->
Identity];

In[3]:=
Show[Graphics[{Hue[0.8], Rectangle[{0, 0},
{1.234, 1}]}], Graphics[{Hue[0.2],
Rectangle[{1.234, 0}, {Pi, 1}]}], p1, p2,
Graphics[{Hue[1], Thickness[0.01],
Line[{{1.234, -0.1}, {1.234, 1.1}}]}],
Graphics[Text["1.234", {1.234, -0.2}]],
Axes -> True, AxesOrigin -> {-0.1, 0},
DisplayFunction -> \$DisplayFunction];

Tomas Garza
Mexico City
----- Original Message -----
From: "Roberto Brambilla" <rlbrambilla at cesi.it>
To: mathgroup at smc.vnet.net
Subject: [mg44342] [mg44262] Plot&2backgroundcolors

> 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
>
>
>

```

• Prev by Date: Re: simple equation system -- crashing M5?
• Next by Date: RE: Plot&2backgroundcolors