Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to plot a graph from list of points, but each point also has uncertainty assigned AND date. Without uncertainties DateListPlot works great, without dates ErrorListPlot works OK, but how it could be done both at the same time?

I tried displaying 2 plots (DateListPlot + ErrorListPlot) using Show, but it didn't work. Any ideas?

share|improve this question
up vote 8 down vote accepted

The plots can't be directly combined because the PlotRange of the DateListPlot is far out to the right on the horizontal axis, since it corresponds to a large AbsoluteTime value. So we have to convert the ErrorListPlot to the same coordinate range before combining the plots using Show:


data = {{{2006, 10, 1}, 10, 1}, {{2006, 10, 15}, 
    12, .1}, {{2006, 10, 30}, 15, 2}, {{2006, 11, 20}, 20, 1}};

data2 = 
 Map[{{AbsoluteTime[#[[1]]], #[[2]]}, ErrorBar[#[[3]]]} &, data]

==> {{{3368649600, 10}, ErrorBar[1]}, {{3369859200, 12}, 
  ErrorBar[0.1]}, {{3371155200, 15}, ErrorBar[2]}, {{3372969600, 20}, 

errorp = ErrorListPlot[data2];

datep = DateListPlot[data[[All, 1 ;; 2]]];

Show[datep, errorp]


share|improve this answer
Thank you very much! It works perfectly.^^ – crobartie Feb 3 '13 at 18:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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