Re: PlotLegend-> and DateListPlot[]...incompatible or broken?
- To: mathgroup at smc.vnet.net
- Subject: [mg110813] Re: PlotLegend-> and DateListPlot[]...incompatible or broken?
- From: Tyler <hayes.tyler at gmail.com>
- Date: Wed, 7 Jul 2010 07:44:30 -0400 (EDT)
- References: <i0u01r$jrb$1@smc.vnet.net>
Yup. Same thing on my Mac. The only way I could get something to work was by converting the dates to AbsoluteTime like so: Needs["PlotLegends`"] ibm = FinancialData["IBM", {2000, 1, 1}]; msft = FinancialData["MSFT", {2000, 1, 1}]; ibm = Transpose[{AbsoluteTime /@ ibm[[All, 1]], ibm[[All, 2]]}]; msft = Transpose[{AbsoluteTime /@ msft[[All, 1]], msft[[All, 2]]}]; p1 = DateListPlot[{ibm, msft}, Joined -> True, PlotLabel -> "Apple vs. MicroSoft", FrameLabel -> {"Date", "Price (USD)"}, PlotLegend -> {"APPL", "MSFT"}, LegendSize -> {0.5, 0.2}, LegendTextSpace -> 6, LegendShadow -> None, LegendPosition -> {0, -0.4}]; Show[p1, ImageSize -> 470] Cheers, t.