 
 
 
 
 
 
RE: Filled Plot
- To: mathgroup at smc.vnet.net
- Subject: [mg25910] RE: [mg25884] Filled Plot
- From: "David Park" <djmp at earthlink.net>
- Date: Tue, 7 Nov 2000 23:04:57 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Pedro,
Needs["Statistics`ContinuousDistributions`"]
Needs["Graphics`FilledPlot`"]
f[x_] := PDF[NormalDistribution[0, 3], x]
Block[{$DisplayFunction = Identity},
    plota = Plot[f[x], {x, -3, 3}];
    plotb = FilledPlot[f[x], {x, 0, 3}]];
Show[plota, plotb, AxesFront -> True, PlotRange -> All];
Here is a somewhat fancier plot using the DrawingPaper package available at
my web site.
Needs["Graphics`DrawingPaper`"]
Needs["Graphics`FilledDrawing`"]
Show[Graphics[
	{Draw[f[x], {x, -7, 7}],
        FilledDraw[f[x], {x, 0, 3}, Fills -> LightBlue],
        Text[SequenceForm["mu = ", 0], {-6.7, 0.12}, {-1, 0}],
        Text[SequenceForm["sigma = ", 3], {-6.7, 0.11}, {-1, 0}]}],
AspectRatio -> 1/GoldenRatio, PlotRange -> All, Background -> Linen,
{Frame -> True, FrameLabel -> {x, p},
      PlotLabel -> "Normal Distribution and\n One Standard Deviation",
      ImageSize -> 450}];
David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/
> -----Original Message-----
> From: Pedro Ferreira [mailto:pjmferreira at hotmail.com]
To: mathgroup at smc.vnet.net
> Hi,
>
> Can I plot de Normal density function Plot[dist,{x,-3,3}] and then fill
> only a region under that curve, for example {x,0,3}?
>
> Thank you.

