MathGroup Archive 2006

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

Search the Archive

Re: question about plot


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



  • Prev by Date: Re: General--Mathematica and Subversion
  • Next by Date: Re: General--Mathematica and Subversion
  • Previous by thread: question about plot
  • Next by thread: Re: question about plot