Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

ShowLegend....

  • To: mathgroup at smc.vnet.net
  • Subject: [mg53617] ShowLegend....
  • From: "plizak" <plizak at gmail.com>
  • Date: Thu, 20 Jan 2005 03:48:05 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

There has to be an easier way to do this....

I was trying to figure out how to use showlegend, and here's what I
came out with....

(* plot2 and plot3 are two different plots *)

plotX = Show[ {plot2 , plot3}, PlotRange -> {{ -0.4, 0.4}, {-1, 10}}]

legend = ShadowBox[ {-0.4, 6}, {0.3, 3}, ShadowBackground -> GrayLevel[
0.5], ShadowOffset -> {0.025, -0.5}];

showlegend = Show[ plotX, Graphics[{legend , {
Text["Normal - solid", {-.375, 6.775}, {-1.0, 0}],
Text["Data - dashed", {-.375, 7.775}, {-1.0, 0}]
}
}
]
]

That is way to much code to just add a legend to a graph.

Is there a faster/easier way to do this?
Is there a way that the legend also includes an example of the line /
linestyle?  

Cheers and thanks,
Peter


  • Prev by Date: Memory usage
  • Next by Date: Algebraic problem solved by simulation
  • Previous by thread: Re: Memory usage
  • Next by thread: Re: ShowLegend....