Re: Plot and filling option
- To: mathgroup at smc.vnet.net
- Subject: [mg94609] Re: Plot and filling option
- From: Szabolcs <szhorvat at gmail.com>
- Date: Wed, 17 Dec 2008 06:35:31 -0500 (EST)
- References: <gi821v$gdr$1@smc.vnet.net>
On Dec 16, 12:05 pm, Pat <pbouge... at lameta.univ-montp1.fr> wrote: > Hello everyone. > > I need some help to make a nice plot for my teaching. > > I'd like to graph the following interval: > 0 < x < 1 > 0 < y < 3 > 0 < x y < 2. > > I did this: > > Plot[{3, 2/x}, {x, 0, 4}, AxesLabel -> {"x", "y"}, > Prolog -> {Line[{{1, 0}, {1, 4}}]}, Filling -> {1 -> Top, 2 -> Top}, > PlotRange -> {0, 4}] > > But I have no idea how I can fill the right side of the vertical line > X=1. > > If you have any suggestions. Maybe I should write another code. > Here's one way, Pat: RegionPlot[ 0 < x < 1 && 0 < y < 3 && 0 < x y < 2, {x, -0.5, 1.5}, {y, -.5, 3.5}]