Sometimes I get really tired of Preparing data for making an ErrorListPlot using Thread and friends. Is there a simpler way to plot an ErrorListPlot with only y error bars?

Nothing is mentioned in the documentation.

  • $\begingroup$ Perhaps I should change this into a self answered Q/A? What's the simplest way to plot an ErrorListPlot?:) $\endgroup$
    – Ajasja
    Apr 12 '13 at 13:56
  • $\begingroup$ I agree with the Q/A idea. $\endgroup$
    – Mr.Wizard
    Apr 12 '13 at 14:12
  • $\begingroup$ @Mr.Wizard done $\endgroup$
    – Ajasja
    Apr 12 '13 at 14:43

Indeed it seems there is a simpler way:

Instead of

ErrorListPlot[{{{x1, y1}, ErrorBar[err1]}, {{x2, y2}, ErrorBar[err2]}, ...}]

Just do

ErrorListPlot[{{x1, y1, dy1}, {x2, y2, dy2} ...}, ...}]

Here is an example:

ErrorListPlot[{{1, 2, 0.5}, {3, 4, 0.1}, {5, 6, 0}}, 
               PlotRange -> All, Frame -> True, Axes -> False]

Example error plot

Why this is not documented is beyond me.

  • 2
    $\begingroup$ If you type ??ErrorListPlotyou get the transformation being used: {{ErrorBarPlotsPrivatex_?NumericQ, ErrorBarPlotsPrivatey_?NumericQ, ErrorBarPlotsPrivatee_? NumericQ} :> (ErrorBarPlotsPrivateerror[ N[{ErrorBarPlotsPrivatex, ErrorBarPlotsPrivatey}]] = ErrorBar[{0, 0}, {-ErrorBarPlotsPrivatee, ErrorBarPlotsPrivatee}];` $\endgroup$ Apr 12 '13 at 17:36

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.