       Re: Filling Plots to the X-Axis for a Range of X Values

• To: mathgroup at smc.vnet.net
• Subject: [mg117772] Re: Filling Plots to the X-Axis for a Range of X Values
• From: Gregory Lypny <gregory.lypny at videotron.ca>
• Date: Thu, 31 Mar 2011 04:00:39 -0500 (EST)
• References: <imushb\$icn\$1@smc.vnet.net>

```Ahhh, two plots!  Clever.  Thank you, Chris.

Gregory

On Wed, Mar 30, 2011, at 8:04 AM, Chris Degnen wrote:

> On Mar 30, 10:18 am, Gregory Lypny <gregory.ly... at videotron.ca> wrote:
>> Hello everyone,
>>
>> I'd like to fill a plot down to the x-axis but restrict the fill to lie between two x values, and am not sure how to do it.  For example, if I plot a parabola f[x] = x^2, with x in the range =E2=88=9210 to 10, I'd like to be able to fill to the x-axis between x = 2 and x = 7, essentially creating a filled column.  Is there any way to do that?
>>
>> Regards,
>>
>> Gregory
>
> Plot[{x^2, If[2 <= x <= 7, 0]}, {x, 0, 10},
> PlotStyle -> {Automatic, None}, Filling -> {1 -> {2}}]

```

• Prev by Date: Re: Sum of powers of multiplied terms
• Next by Date: Re: Sum of powers of multiplied terms
• Previous by thread: Re: Filling Plots to the X-Axis for a Range of X Values
• Next by thread: Re: Filling Plots to the X-Axis for a Range of X Values