Re: question about plot
- To: mathgroup at smc.vnet.net
- Subject: [mg69664] Re: [mg69652] question about plot
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Wed, 20 Sep 2006 02:44:13 -0400 (EDT)
- Reply-to: hanlonr at cox.net
Needs["Graphics`"];
delta[n_, x_] := n/(Sqrt[Pi]/E^(-n^2*x^2));
Plot[Evaluate[delta[#,x]&/@Range[0,10]],{x,-2,2},
PlotRange->All,ImageSize->{800,500},
PlotStyle->(Hue[#/11]&/@Range[11]),
PlotLegend->("n = " <> ToString[#]&/@
Range[0,10]), Frame->True,Axes->False,
LegendPosition->{0.5,-0.3}];
Bob Hanlon
---- dimmechan at yahoo.com wrote:
> Hi.
>
> I define a delta sequence.
>
> Needs["Graphics`"]
>
> delta[n_, x_] := n/(Sqrt[Pi]/E^((-n^2)*x^2))
>
> I can't understand what I do wrong in the following command.
> I really appreciate any comments.
>
> Show[(Plot[delta[#1, x], {x, -2, 2}, DisplayFunction -> Identity,
> PlotRange -> All, ImageSize -> {800, 500}, PlotStyle -> Hue[#1],
> PlotLegend -> StringJoin["n= ", ToString[#1]]] & ) /@ Range[0, 10],
> DisplayFunction -> $DisplayFunction]
>
> Thanks
>
--
Bob Hanlon
hanlonr at cox.net