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

Re: Problem with PlotLegend in Mathematica 6.0

  • To: mathgroup at smc.vnet.net
  • Subject: [mg78016] Re: [mg77954] Problem with PlotLegend in Mathematica 6.0
  • From: Curtis Osterhoudt <cfo at lanl.gov>
  • Date: Thu, 21 Jun 2007 05:49:11 -0400 (EDT)
  • Organization: LANL
  • References: <200706200938.FAA10182@smc.vnet.net>
  • Reply-to: cfo at lanl.gov

On Wednesday 20 June 2007 03:38:41 peter.steneteg at gmail.com wrote:
> Needs["PlotLegends`"]
> fn = {Sin[x], Cos[x]}
> Plot[fn, {x, 0, 2 Pi}, PlotLegend -> {"sin", "cos"}]
> Plot[{Sin[x], Cos[x]}, {x, 0, 2 Pi}, PlotLegend -> {"sin", "cos"}]

Hi, Peter. 

   In the first (nonworking) case, wrap "fn" with an Evaluate. Then it will 
work as you expect. I'm not sure _why_ (I usually don't follow how things 
really do evaluate in Mathematica).



-- 
==========================================================
Curtis Osterhoudt
cfo at remove_this.lanl.and_this.gov
PGP Key ID: 0x4DCA2A10
Please avoid sending me Word or PowerPoint attachments
See http://www.gnu.org/philosophy/no-word-attachments.html
==========================================================


  • Prev by Date: Re: v5.2 preferred for stability over v6.0
  • Next by Date: Re: Reproducible crash in version 6
  • Previous by thread: Problem with PlotLegend in Mathematica 6.0
  • Next by thread: Re: Problem with PlotLegend in Mathematica 6.0