MathGroup Archive 2003

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

Search the Archive

Re: FilledPlot Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39059] Re: FilledPlot Question
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Sun, 26 Jan 2003 05:23:22 -0500 (EST)
  • References: <b0tetq$9hu$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"Matthew Senn" <msenn77 at yahoo.com> wrote in message
news:b0tetq$9hu$1 at smc.vnet.net...
> i'm relatively new using mathematica 4.2.  the other day, i came across
what
> seemed to be a simple problem, but i couldn't figure out how to do it.
>
> say i was plotting y=x^2, and i wanted to shade the region under the graph
> only between x=2 to x=4 over a range of {x, 0, 5}, is there a way to do
> this?  i tried FilledPlot, but it filled the entire area under the graph.
>
> thank you!
>
>
>

Matthew,

A third way:

    << Graphics`Graphics`

    DisplayTogether[
      FilledPlot[{0, x^2}, {x, 2, 4}],
      Plot[x^2, {x, 0, 5}]]

If we use x^2 instead of {0,x^2} the fill is gray.


--
Allan

---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565






  • Prev by Date: Re: FilledPlot Question
  • Next by Date: Re: FilledPlot Question
  • Previous by thread: Re: FilledPlot Question
  • Next by thread: Re: FilledPlot Question