# Error bars in the same plot

I have the following data:

data= {{60, 4.92444, 0.156206}, {65, 3.73818, 0.0458043}, {70, 2.19564,
0.0539134}, {75, 0.6554, 0.0533553}, {80, 1.0604, 0.0127809}, {85,
0.790124, 0.0630165}, {87, 0.594196, 0.109998}, {90, 0.0166927,
0.014323}, {92, 0.044787, 0.0246567}}


Where the values are {x-value,y-value,error}

Question:

How can I plot the x-values and y-values and the errors as error bars in a plot?. If I use ListPlot[data[[All, {1, 2}]]], I can only plot the x-values and y-values but I do not know how to incorporate the errors as error bars in the same plot.

Transform your data using Around:

data2 = {#, Around[##2]}& @@@ data;

ListPlot[data2]


ListPlot[data2,
IntervalMarkers -> "Bands", IntervalMarkersStyle -> Pink]


ListPlot[data2,
IntervalMarkersStyle -><|"FenceWidth" -> 2,"FenceStyle" -> Red |>]


• kglr thank you! This work great ! . Can I ask you how is it possible to change the size of only the error bars from your code?
– John
Jun 27, 2020 at 20:34
• @John, try if IntervalMarkersStyle -> "FenceWidth" -> k (for your choice of a number k) gives what you need.
– kglr
Jun 27, 2020 at 20:40
• kglr thank you but if I try ListPlot[data2, IntervalMarkersStyle -> "FenceWidth" -> 800] (even putting a number like 800) does not work at all to change the size of the error bar. I am interested in the first figure you plotted but it would be great if I can also make a little bigger the error bars of even put them Bold
– John
Jun 27, 2020 at 20:44
• @John, try IntervalMarkersStyle -> <|"FenceWidth" -> k|> for different different values for k.
– kglr
Jun 27, 2020 at 20:51