Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Legend for DateListPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100004] Legend for DateListPlot
  • From: greg.mcavoy at gmail.com
  • Date: Thu, 21 May 2009 00:16:33 -0400 (EDT)

I would like to add a PlotLegend to a time series plot like the one
below.
DateListPlot[{Tooltip[FinancialData["MSFT", "2006"],
   "Microsoft Corporation"],
  Tooltip[FinancialData["SNE", "2006"], "Sony Corporation"],
  Tooltip[FinancialData["AKAM", "2006"], "Akamai Technologies Inc"]},
 Joined -> True]

I tried using the PlotLegends package, but it doesn't appear to work
with DateListPlot
(code below)
Needs["PlotLegends`"]

DateListPlot[{FinancialData["MSFT", "2006"],
  FinancialData["SNE", "2006"], FinancialData["AKAM", "2006"]},
 Joined -> True,
 PlotLegend -> { "Microsoft Corporation", "Sony Corporation",
   "Akamai Technologies Inc"}]

Is there a work around to this problem or something wrong with my
code?  I want to export the graph to for use in a latex document so
Tooltip is not a useful option.





  • Prev by Date: Re: print variable name and its value
  • Next by Date: Mathematica in Research and Education - Liege and Delft
  • Previous by thread: Re: Import of NIST ANOVA data sets
  • Next by thread: Re: Legend for DateListPlot