Cannot plot Quantity values with DateListPlot

Bug introduced in 9.0.0 and fixed in 9.0.1

Quantity is new in 9.0.0

Is there a way to use DateListPlot with Quantity values? I retrieved the following time series data from WolframAlpha:

gasPrices = WolframAlpha[
"us gas prices", {{"History:Price:GasPriceData", 1},
"TimeSeriesData"}];


Each data point is composed of a date and a Quantity:

{{{1993, 4, 5, 0, 0, 0.}, Quantity[1.068, ("USDollars")/("Gallons")]},
{{1993, 4, 19, 0, 0, 0.}, Quantity[1.079, ("USDollars")/("Gallons")]},
...
{{2012, 12, 31, 0, 0, 0.}, Quantity[3.369, ("USDollars")/("Gallons")]} }


I can plot the values using ListPlot:

 ListPlot[gasPrices[[All,2]]]


Strangely however, DateListPlot produces an empty plot:

 DateListPlot[gasPrices]


To get DateListPlot to produce a proper plot I have to do this instead:

DateListPlot[ Transpose[{gasPrices[[All, 1]], gasPrices[[All, 2, 1]]}] ]


Am I missing something? I would have thought that Quantity values could be taken directly by DateListPlot, as they are by ListPlot.

• I tested your code and it seems that Units are not properly implemented in DateListPlot Jan 5, 2013 at 18:36
• You can also do: DateListPlot[QuantityMagnitude[gasPrices]] to remove the units. Jan 15, 2013 at 5:23

 DateListPlot[gasPrices]