4

I have been using

Needs["ErrorBarPlots`"]

for a while but after my update to the last version of Mathematica I get the warning:

ErrorBarPlots` is now obsolete. The legacy version being loaded may \ conflict with current functionality. See the Compatibility Guide for \ updating information.

What should I use instead?

PhoenixPerson
  • 553
  • 2
  • 10
  • 3
  • 2
    I disagree with the close reason that this is "easy to find in the documentation". I tried to search for "ErrorBarPlots" and it gives me nothing useful, not even the documentation of the Error Bar Plots package. If I search for "errorbarplots" (lowercase) then it gives the relevant results, but I did not figure this out for a while. – Szabolcs Oct 17 '19 at 13:08
  • @Szabolcs Well, I searched for "error bars" in the help browser and got "IntervalMarkersStyle" as a first hit and "IntervalMarkers" as a third one. See this screenshot. – Anton Antonov Oct 17 '19 at 18:23

1 Answers1

5

You can now use ListPlot with Around numbers:

ListPlot[{Around[1, 0.3], Around[0.5, 0.1], Around[0.8, 0.15]}]

enter image description here

And errors in both directions also work:

ListPlot[{{Around[1, 0.3], Around[1, 0.3]}, {Around[2, 0.3],Around[0.5, 0.1]}, {Around[3, 0.15], Around[0.8, 0.15]}}]

enter image description here

SHuisman
  • 3,258
  • 8
  • 12
  • 2
    There still seems to be a small offset between center of error bars and center of data point. Is this still the 'old' issue eg discussed here: https://mathematica.stackexchange.com/questions/2214/point-renderings-slightly-off-in-mathematica ? – Markus Roellig Oct 17 '19 at 12:31
  • 1
    This is because I just took a screenshot, will be fine if you use Export["out.pdf",%]. Points are pixel-aligned if i recall correctly. – SHuisman Oct 17 '19 at 13:39