Re: Using ShowLegend
- To: mathgroup at smc.vnet.net
- Subject: [mg24965] Re: [mg24958] Using ShowLegend
- From: BobHanlon at aol.com
- Date: Mon, 28 Aug 2000 08:27:23 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 8/25/2000 12:19:48 AM, kspk at my-deja.com writes: >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? > PlotLegend has no way of knowing whether the curves were created inside a Table. Needs["Graphics`Legend`"]; Plot[Evaluate[Table[Sin[k*x], {k, 3}]], {x, 0, 2 Pi}, PlotStyle -> {RGBColor[1, 0, 0], {RGBColor[0, 1, 0], AbsoluteDashing[{5, 5}]}, {RGBColor[0, 0, 1], AbsoluteDashing[{4, 5, 2, 5 }]}}, PlotLegend -> Table["Sin[" <> ToString[k*x] <> "]", {k, 3}], ImageSize -> {500, 340}]; Bob Hanlon