Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Plot&2backgroundcolors

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44334] Re: Plot&2backgroundcolors
  • From: "Steve Luttrell" <luttrell at _removemefirst_westmal.demon.co.uk>
  • Date: Wed, 5 Nov 2003 10:01:42 -0500 (EST)
  • References: <bo7nq2$ads$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

This does what you want.

a = 1.234;

Plot[Sin[x], {x, 0, Pi}, Prolog -> {RGBColor[1, 1, 0],
     Rectangle[{0, 0}, {a, a}], RGBColor[0, 1, 0],
     Rectangle[{a, 0}, {Pi, a}], RGBColor[0, 0, 0]},
   Epilog -> {Dashing[{0.02}], RGBColor[1, 0, 0],
     Thickness[0.01], Line[{{1.234, 0}, {a, 1}}]},
   Ticks -> {{{a, ToString[a]}, {Pi, "\[Pi]"}},
     Automatic}];

--
Steve Luttrell
West Malvern, UK

"Roberto Brambilla" <rlbrambilla at cesi.it> wrote in message
news:bo7nq2$ads$1 at smc.vnet.net...
> 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: exporting a list of functions for use in a C function
  • Next by Date: Re: ComplexExpand
  • Previous by thread: Re: Plot&2backgroundcolors
  • Next by thread: Re: Plot&2backgroundcolors