       Re: question about plot

• To: mathgroup at smc.vnet.net
• Subject: [mg69670] Re: [mg69652] question about plot
• From: bsyehuda at gmail.com
• Date: Wed, 20 Sep 2006 02:44:35 -0400 (EDT)

```Hi,
You probably mean PlotLabel and not PlotLegend, but then is wil lnot make
sense, since oly the first plot label  (from value n=0) is used, so
PlotLegend does make sense. So, you need to install the Graphics`Legend`
package.
The basic error in your code is that PlotLegend is a single option that
should point to the complete list of legend labels of the curves plotted by
a single
Plot function.

in addition, Hue[x] where x is an integer is always a red color
so all corrected code follows.
<< Graphics`Legend`
Plot[Evaluate[delta[#, x] & /@
Range[0, 10]], {x, -2, 2}, PlotRange -> All,
PlotStyle -> Table[Hue[i/11], {i, 0,
10}], PlotLegend -> ToString /@ Range[0, 10], LegendLabel ->
"n", ImageSize -> 500]

It also looks that PlotRange->{-0.5,0.5} generates nicer results

Good luck
yehuda

On 9/19/06, dimmechan at yahoo.com <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
>
>

```

• Prev by Date: Re: adding assumptions to Integrate
• Next by Date: Re: General--Mathematica and Subversion
• Previous by thread: Re: question about plot
• Next by thread: RE: question about plot