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

MathGroup Archive 2007

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

Search the Archive

Using ShowLegend

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79833] Using ShowLegend
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Mon, 6 Aug 2007 03:37:07 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • Reply-to: murray at math.umass.edu

After loading Mathematica 6 package PlotLegends`, the following input 
gives errors of the form

   PlotLegends`Legend is not a Graphics primitive or directive.

Why, and how should one actually do this?  (The Documentation Center 
pages for ShowLegend and Legend together with the one example on the 
page for ShowLegend is not sufficient help for me.)

   ShowLegend[
     Plot[{x,x^2,x^3},{x,0,1},
       PlotStyle->{Directive[Black,Thick],Directive[Blue,Dashed],Green}
       ],
     {Blue,"x"},{Red,"x^2"},{Green,"x^3"}
   ]

Note that it does not seem to be possible to use, instead of the 
ShowLegend wrapper, the PlotLegend option within the Plot expression, as 
I seem to have no control over the styling of the labeled lines that 
appear in the legend. (At least neither the documentation for PlotLegend 
  does not indicate how to do this.)

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: Serious Problem with GridLines
  • Next by Date: Re: Solving differential equations with parameters
  • Previous by thread: Re: ndsolve ndsv problem
  • Next by thread: RE: Using ShowLegend