Re: filled plot on part of x-interval
- To: mathgroup at smc.vnet.net
- Subject: [mg44644] Re: [mg44599] filled plot on part of x-interval
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Wed, 19 Nov 2003 04:59:10 -0500 (EST)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <200311170838.DAA01205@smc.vnet.net>
- Reply-to: murray at math.umass.edu
- Sender: owner-wri-mathgroup at wolfram.com
Thank you all for your solutions. Of course I had been hoping for some way to directly tweak FilledPlot itself to do this within the single function. But it seems that's not possible. The simplest solution seems to be of the form: f[x_] := Sqrt[x] Needs["Graphics`FilledPlot`"] filled = FilledPlot[f[x], {x, 2, 10}, PlotRange -> {{0, 10}, All}]; graph = Plot[f[x], {x, 2, 10}, PlotRange -> All]; Show[{filled, graph}]; In such situations, I find it handy to use the functions DontShow and DoShow from David Park's DrawGraphics package to more readably manipulate DisplayFunction: Needs["DrawGraphics`DrawingMaster`"] filled = DontShow @ FilledPlot[f[x],{x,2,10},PlotRange->{{0,10},All}]; graph = DontShow @ Plot[f[x],{x,2,10},PlotRange->All]; DoShow[{filled, graph}]; Using Graphics`DisplayTogether` has the advantage that PlotRange does not seem to be needed, at least for the examples I tried. Needs["Graphics`Graphics`"] filled = DontShow @ FilledPlot[f[x], {x, 2, 10}]; graph = DontShow @ Plot[f[x], {x, 0, 10}]; DisplayTogether[filled, graph]; Murray Eisenberg wrote: > How do I use a FilledPlot that fills the region under the graph of f[x] > only, say, for x from 2 to 10 but still graphs the function itself from > 0 to 10? > -- Murray Eisenberg murray at math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305
- References:
- filled plot on part of x-interval
- From: Murray Eisenberg <murray@math.umass.edu>
- filled plot on part of x-interval