MathGroup Archive 2011

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg117766] Re: Filling Plots to the X-Axis for a Range of X Values
  • From: Chris Degnen <degnen at cwgsy.net>
  • Date: Thu, 31 Mar 2011 03:59:35 -0500 (EST)
  • References: <imushb$icn$1@smc.vnet.net>

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: Series holding the final sum
  • Next by Date: Re: Filling Plots to the X-Axis for a Range of X Values
  • 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