Re: Using ShowLegend

*To*: mathgroup at smc.vnet.net*Subject*: [mg24963] Re: Using ShowLegend*From*: "Borut L." <JustMyName at email.si>*Date*: Mon, 28 Aug 2000 08:27:21 -0400 (EDT)*References*: <8o4rim$f2f@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Hi, PlotLegend will do alright! I think, that you forgot to evaluate functions in Table. So, to plot sin x, sin 2x and sin 3x on the same graph with legend you need to do: In[1]:= <<Graphics`Legend` In[2]:= Plot[ Evaluate[Table[Sin[i x], {i, 3}]], {x, 0, 2\[Pi]}, PlotStyle -> {Hue[0], GrayLevel[0.6],Hue[0.3]}, PlotLegend -> {"sin x", "sin 2x", "sin 3x"} ] Again, function should be evaluated first, so Legend command can pick them up to continue. Legend also uses PlotStyle to draw the legend right. ShowLegend on the other hand could be good alternative. It's used in other 2D graphics than Plot. bye, Borut Karthik <kspk at my-deja.com> wrote in message news:8o4rim$f2f at smc.vnet.net... > I have created a plot with 3 curves. I want to associate a legend with > these curves - the legend must contain a full line and two broken lines > with varying lengths of the dashes. > > I cannot use PlotLegend because the curves are created inside a Table > command. ShowLegend seems to be the way to go, but I can't make > it go thru. Can someone post a simple example of ShowLegend containing > multiple curves with a corresponding legend? > > Thanks in advance. > > Karthik > > > Sent via Deja.com http://www.deja.com/ > Before you buy. >