Skip to main content
Routine clean-up
Source Link
m_goldberg
  • 108.1k
  • 16
  • 104
  • 259

After upgr. to 11.1 Tooltip Tooltips of DateListdata points in DateListPlot rendersrender dates as scien. not. instead of datereal numbers

Last year (in Mathematica 10V10.x) I created a DateListPlotDateListPlot of commodity price data. I use Tooltipused Tooltip to display the date and the data value from a DateListdate list. I upgraded to version 11V11 and everything was fine. The Tooltipstooltips would render properly like this: {Fri 17 Feb 2017, 1.58}{Fri 17 Feb 2017, 1.58}

But after I upgraded to 11.1 the Tooltipstooltips now render in scientific notation, like this (same date): {3.69628 x 109, 1.58}

Here's the DateListPlot:

pListCurrYr = {{{2017, 1, 3, 0, 0, 0.}, 1.67}
, {{2017, 1, 4, 0, 0, 0.}, 1.66}, ...}; (* 3 mos. of data *)

DateListPlot[
 Tooltip[pListCurrYr]
 , PlotTheme -> "Classic"
 , AspectRatio -> 0.8
 , PlotLabel -> Style[
   Framed[
    "CME Block Cheese Prices from "
     <> DateString[
      pListCurrYr[[1, 1]], {"MonthName", " ", "DayShort"}] <> " to "
     <> DateString[
      pListCurrYr[[Length[pListCurrYr], 1]], {"MonthName", " ", 
       "DayShort", ", ", "Year"}]
    ]
   , "Subsection"
   ]
 , Filling -> Bottom
 , PlotMarkers -> {\[FilledDiamond], 18}
 , PlotRange -> {Full, {1.00, 2.00}}
 ]

I've tried to use DateStringsDateString objects instead of DateDate objects in the pListCurrYr List...pListCurrYr, but TooltipTooltip still interprets them in scientific notation.

Could you please show me what I'm doing wrong? Thank you!

Steve Erbach

After upgr. to 11.1 Tooltip of DateList in DateListPlot renders as scien. not. instead of date

Last year (in Mathematica 10.x) I created a DateListPlot of commodity price data. I use Tooltip to display the date and the data value from a DateList. I upgraded to version 11 and everything was fine. The Tooltips would render properly like this: {Fri 17 Feb 2017, 1.58}

But after I upgraded to 11.1 the Tooltips now render in scientific notation, like this (same date): {3.69628 x 109, 1.58}

Here's the DateListPlot:

pListCurrYr = {{{2017, 1, 3, 0, 0, 0.}, 1.67}
, {{2017, 1, 4, 0, 0, 0.}, 1.66}, ...}; (* 3 mos. of data *)

DateListPlot[
 Tooltip[pListCurrYr]
 , PlotTheme -> "Classic"
 , AspectRatio -> 0.8
 , PlotLabel -> Style[
   Framed[
    "CME Block Cheese Prices from "
     <> DateString[
      pListCurrYr[[1, 1]], {"MonthName", " ", "DayShort"}] <> " to "
     <> DateString[
      pListCurrYr[[Length[pListCurrYr], 1]], {"MonthName", " ", 
       "DayShort", ", ", "Year"}]
    ]
   , "Subsection"
   ]
 , Filling -> Bottom
 , PlotMarkers -> {\[FilledDiamond], 18}
 , PlotRange -> {Full, {1.00, 2.00}}
 ]

I've tried to use DateStrings instead of Date objects in the pListCurrYr List... but Tooltip still interprets them in scientific notation.

Could you please show me what I'm doing wrong? Thank you!

Steve Erbach

Tooltips of data points in DateListPlot render dates as real numbers

Last year (in V10.x) I created a DateListPlot of commodity price data. I used Tooltip to display the date and the data value from a date list. I upgraded to V11 and everything was fine. The tooltips would render properly like this: {Fri 17 Feb 2017, 1.58}

But after I upgraded to 11.1 the tooltips now render in scientific notation, like this (same date): {3.69628 x 109, 1.58}

Here's the DateListPlot:

pListCurrYr = {{{2017, 1, 3, 0, 0, 0.}, 1.67}
, {{2017, 1, 4, 0, 0, 0.}, 1.66}, ...}; (* 3 mos. of data *)

DateListPlot[
 Tooltip[pListCurrYr]
 , PlotTheme -> "Classic"
 , AspectRatio -> 0.8
 , PlotLabel -> Style[
   Framed[
    "CME Block Cheese Prices from "
     <> DateString[
      pListCurrYr[[1, 1]], {"MonthName", " ", "DayShort"}] <> " to "
     <> DateString[
      pListCurrYr[[Length[pListCurrYr], 1]], {"MonthName", " ", 
       "DayShort", ", ", "Year"}]
    ]
   , "Subsection"
   ]
 , Filling -> Bottom
 , PlotMarkers -> {\[FilledDiamond], 18}
 , PlotRange -> {Full, {1.00, 2.00}}
 ]

I've tried to use DateString objects instead of Date objects in pListCurrYr, but Tooltip still interprets them in scientific notation.

Could you please show me what I'm doing wrong?

Source Link

After upgr. to 11.1 Tooltip of DateList in DateListPlot renders as scien. not. instead of date

Last year (in Mathematica 10.x) I created a DateListPlot of commodity price data. I use Tooltip to display the date and the data value from a DateList. I upgraded to version 11 and everything was fine. The Tooltips would render properly like this: {Fri 17 Feb 2017, 1.58}

But after I upgraded to 11.1 the Tooltips now render in scientific notation, like this (same date): {3.69628 x 109, 1.58}

Here's the DateListPlot:

pListCurrYr = {{{2017, 1, 3, 0, 0, 0.}, 1.67}
, {{2017, 1, 4, 0, 0, 0.}, 1.66}, ...}; (* 3 mos. of data *)

DateListPlot[
 Tooltip[pListCurrYr]
 , PlotTheme -> "Classic"
 , AspectRatio -> 0.8
 , PlotLabel -> Style[
   Framed[
    "CME Block Cheese Prices from "
     <> DateString[
      pListCurrYr[[1, 1]], {"MonthName", " ", "DayShort"}] <> " to "
     <> DateString[
      pListCurrYr[[Length[pListCurrYr], 1]], {"MonthName", " ", 
       "DayShort", ", ", "Year"}]
    ]
   , "Subsection"
   ]
 , Filling -> Bottom
 , PlotMarkers -> {\[FilledDiamond], 18}
 , PlotRange -> {Full, {1.00, 2.00}}
 ]

I've tried to use DateStrings instead of Date objects in the pListCurrYr List... but Tooltip still interprets them in scientific notation.

Could you please show me what I'm doing wrong? Thank you!

Steve Erbach