Bug introduced in 10.4 or earlier and persisting through 12.0
Consider the following example:
ClearAll["Global`*"];
Needs["ErrorBarPlots`"];
x=Table[n,{n,1,100}];
SeedRandom[314];
y=RandomReal[{9,10},100];
yErr=RandomReal[{0,1},100];
yWithErrors=Transpose[{Transpose[{x,y}],ErrorBar/@yErr}];
ErrorListPlot[yWithErrors, Joined -> True, PlotStyle -> {Blue},
Epilog -> {PointSize[Large], Point[Transpose[{x, y}]]},
PlotRange -> All, Frame -> True,
FrameLabel -> {{"y", ""}, {"x", ""}},
BaseStyle -> {FontSize -> 20, FontFamily -> "Calibri"},
ImageSize -> 600]
Independently if I use PlotRange -> All
, PlotRange -> Total
or PlotRange -> Automatic
the output is:
As you see the error bars are not completely visible.
Is the only solution to see the error bars to set the PlotRange
manually?
ErrorListPlot[yWithErrors, Joined -> True, PlotStyle -> {Blue},
Epilog -> {PointSize[Large], Point[Transpose[{x, y}]]},
PlotRange -> {All, {8, 11}}, Frame -> True,
FrameLabel -> {{"y", ""}, {"x", ""}},
BaseStyle -> {FontSize -> 20, FontFamily -> "Calibri"},
ImageSize -> 600]
ErrorListPlot
is no longer considering the error bars when calculating the plot range. You get the exact same plot range regardless of how large the errors are. $\endgroup$ErrorListPlot[{.1 #, .8} & /@ Range[10], PlotRange -> All]
, which also shows the utility of kglr's workaround. $\endgroup$