2
$\begingroup$

With a vector dates (in DateList format), and a vector data that has the same length as dates and contains numerical values,

DateListPlot[{dates, data} // Transpose]

produces a very nice plot with automatically spaced time or date stamps. Today for some reason, I am getting a framed plot with no ticks or indices.

This has started happening after I restarted Mathematica after a crash.

$\endgroup$
  • $\begingroup$ Check the output of Options[DateListPlot] and make sure they match the defaults listed in the docs. $\endgroup$ – J. M. will be back soon May 27 '15 at 12:54
  • $\begingroup$ Yes they do. I've also tried including Ticks -> True and FrameTicks -> True. No luck. $\endgroup$ – zab May 27 '15 at 12:58
  • $\begingroup$ Okay, please post your OS and version to help with diagnosis. $\endgroup$ – J. M. will be back soon May 27 '15 at 14:43
  • $\begingroup$ Mathematica 10.1 for Windows. $\endgroup$ – zab May 28 '15 at 13:26
3
$\begingroup$

I am able to reproduce the behavior you describe:

enter image description here

by going into the Evaluation menu, and deselecting Dynamic Updating Enabled. If you make sure this is selected, you should get ticks for DateListPlot. You may need to slightly resize existing graphics for them to show up, or reopen the notebook.


DateListPlot uses the func case of the Ticks specification, so the ticks get computed on the fly once the plot range has been determined by the frontend. That function evaluation is actually using the same mechanism as Dynamic to have the kernel compute the ticks, even though Dynamic isn't literally present in the output anywhere.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.