4
$\begingroup$

It used to be possible to plot both horizontal and vertical error bars ErrorlistPlot and ErrorBars. However, this has been removed since version 12. It seems that Around only allows vertical error bars. Is there any simpler way to do this without manually constructing a Graphic with a horizontal line and end caps?

$\endgroup$

1 Answer 1

8
$\begingroup$

For Mathematica v 12.0 and above, just use Aroundboth for the $x$ and $y$ values in the data and plot with ListPlot

{
  {Around[0.7, {0.5, 0.9}], Around[0.4, {0.5, 0.9}]},
  {Around[0.9, {0.6, 0.9}], Around[0.3, {0.6, 0.9}]},
  {Around[0.7, {1.0, 0.5}], Around[0.7, {1.0, 0.5}]},
  {Around[0.6, {0.6, 0.3}], Around[0.5, {0.6, 0.3}]}
}

ListPlot[
    Around@@@RandomReal[1,{10,2,2}]
    ,PlotTheme->"Scientific"
]

enter image description here

$\endgroup$

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