# How to draw two error bars at one point in Mathematica? I have read the error bars reference in Mathematica to find how to draw a picture like the one above(The thick error bars indicates interval of 68% probability and the thin ones denotes 98%), but I only find the method to draw like the following picture: or like this: And both are not that I want to draw. How can I draw a picture with a thick error bar and a thin one at one point like Fig.1?

## 2 Answers

Here is some improvement. I assume that you data is in this form;

{1, 1.72224, 2.2189, 0.941405}

First two are your data point. Third entry is %98 error and fourth entry is %68 error.

SeedRandom@2;
data = {#, # + RandomReal, RandomReal[{2, 4}],
RandomReal[{0.5, 2}]} & /@ Range;
dist = 0.05; thicness = 0.004;
ListLinePlot[data[[All, {1, 2}]], Mesh -> Full, MeshStyle -> Red,
PlotStyle -> {Red, Dashed}, Frame -> True, PlotRange -> {-1, 13},
Epilog -> {{{Red,
Line[{{#[], #[] - #[]}, {#[], #[] + #[]}}],
Thickness[thicness],
Line[{{#[], #[] - #[]}, {#[], #[] + #[]}}],
Line[{{#[] - dist, #[] - #[]}, {#[] +
dist, #[] - #[]}}],
Line[{{#[] - dist, #[] + #[]}, {#[] +
dist, #[] + #[]}}]} & /@ data}}] Although we could think to use the extra package ErrorBarPlots, the problem here is the limited use of the error bars and its styling.

This can be a starting point:

data = {#, # + RandomReal[0.5]} & /@ Range;
data1 = {data[], data[]};

err1 = 0.9; err2 = 1.7;

ListPlot[data, PlotRange -> {-1, 11}, Frame -> True,
Epilog -> {{Red, Line[{{#[], #[] - err2}, {#[], #[] + err2}}] & /@
data1},
{Blue, Line[{{#[], #[] - err1}, {#[], #[] + err1}}] & /@
data1}}] • Thank you very much! – Perry_W Mar 25 '18 at 11:38