Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*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 2004

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

Search the Archive

Re: shade area between vertical lines

  • To: mathgroup at smc.vnet.net
  • Subject: [mg46944] Re: shade area between vertical lines
  • From: elmanthira <my_name at microsoftsnetwork.com>
  • Date: Tue, 16 Mar 2004 19:55:10 -0500 (EST)
  • References: <c33d6f$fs3$1@smc.vnet.net> <c36b18$s0u$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Thanks much.  I think I'm going to use the inequality dealie.

Hartmut Wolf's suggestion gave me the error "x2 is not a machine-size 
real number at x ="  a whole bunch of times, but had the lovely property 
of using the filled plot function that I have a bit of familiarity with.

Now I need to figure out how to make dashed lines (I'm assuming it's 
going to be very similar.)

An ancillary question brought up by all three suggestions I saw today:

What does Prolog mean/do?  I read the help file's description of it, but 
my ignorance was unfazed.

Thanks for your time.

Bob Hanlon wrote:
> Needs["Graphics`"];
> 
> Use InequalityPlot
> 
> InequalityPlot[
>     {1<x<2, 1<y<2}, 
>     {x,0,3}, {y,0,3}, 
>     PlotRange->{{-1,5},{-1,5}}, 
>     Fills->Violet,
>     Prolog->{LightBlue,
>         Rectangle[{-1, 1}, {5, 2}],
>         Pink,
>         Rectangle[{1, -1}, {2, 5}],
>         Blue,
>         Line[{{-1,1}, {5,1} }],
>         Line[{{-1,2}, {5,2} }],
>         Red,
>         Line[{{1,-1}, {1,5} }],
>         Line[{{2,-1}, {2,5} }]}];
> 
> Or graphics primatives
> 
> Show[Graphics[{
>         LightBlue,
>         Rectangle[{-1, 1}, {5, 2}],
>         Pink,
>         Rectangle[{1, -1}, {2, 5}],
>         Violet,
>         Rectangle[{1, 1}, {2, 2}],
>         Blue,
>         Line[{{-1,1}, {5,1} }],
>         Line[{{-1,2}, {5,2} }],
>         Red,
>         Line[{{1,-1}, {1,5} }],
>         Line[{{2,-1}, {2,5} }]}],
>     Axes->True, AxesFront->True,
>     AspectRatio->1];
> 
> 
> Bob Hanlon
> 
> In article <c33d6f$fs3$1 at smc.vnet.net>, elmanthira
> <my_name at microsoftsnetwork.com> wrote:
> 
> << I know that it is possible to have Mathematica generate a plot that 
> shows the area shaded in between the lines y=1 and y=2 with something like:
> <<Graphics`FilledPlot`;
> FilledPlot[{1, 2}, {x, -1, 5}, PlotRange -> {-1, 5}]
> 
> This makes a lovely display of the open set in R^2 {(x,y):1<y<2}.
> 
> I wish to intersect this with the set in R^2 {(x,y):1<x<2}.
> 
> First, how can I make it graph the four lines on the same plot, AND 
> shade in rectangle formed by the overlapping bars.
> 
> Ideally, I'd want the bars to be shaded in with the rectangle formed to 
> have some sort of crosshatch pattern, or other "darker" area.  It seems 
> that Mathematica automatically does some color differentiation for 
> different regions, and that would be adequate, I hope.


  • Prev by Date: RE: Re: Excessive Mathematica memory use, revisited.
  • Next by Date: RE: Re: Excessive Mathematica memory use, revisited.
  • Previous by thread: Re: shade area between vertical lines
  • Next by thread: solving for variable and then get these e's..?