Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

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


  • Prev by Date: Problems with Exporting Greek letters in graphics to .eps files
  • Next by Date: Re: mathlink
  • Previous by thread: Using ShowLegend
  • Next by thread: Re: Using ShowLegend