# Displays the mean and standard deviation on the same line [duplicate]

I have data displayed on a line,

I want to present the mean as a horizontal line and a standard deviation as a vertical line.

Example to code:  Show[ListLinePlot[Mean[analysBeeSumOfVelocity[[1 ;;18]]],PlotStyle->Dashed,PlotRange->{{0,8},{0,10}}, AxesLabel-> {"Repeat","Average velocity(cm/sec)"},PlotLabel-> "Hives with 1: 1 diet"], ListLinePlot[Mean[analysBeeSumOfVelocity[[1 ;;6]]], PlotStyle -> Blue], ListLinePlot[Mean[analysBeeSumOfVelocity[[7 ;;12]]], PlotStyle -> Green], ListLinePlot[StandardDeviation[analysBeeSumOfVelocity[[7 ;;12]]], PlotStyle -> Green], ListLinePlot[Mean[analysBeeSumOfVelocity[[13 ;;18]]], PlotStyle -> Red]]

The result

How do I make the bottom green line (standard deviation) appear vertically on the top green line (mean)?

analysBeeSumOfVelocity = RandomReal[{3,5},{18,8}];
ListLinePlot[
MapAt[
Around
, {
analysBeeSumOfVelocity[[1 ;;18]],
analysBeeSumOfVelocity[[1 ;;6]],
analysBeeSumOfVelocity[[7 ;;12]],
analysBeeSumOfVelocity[[13 ;;18]]
}
, {All, All}
]
, PlotStyle-> {Directive[Gray,Dashed], Blue, Green , Red}
, PlotRange-> {{0,8},{0,10}}
, FrameLabel-> {"Repeat","Average velocity [cm/sec]"}
, PlotLabel-> "Hives with 1: 1 diet"
, PlotTheme-> "Scientific"
]


• use Around fix the problem, Thanks.
– erez
Commented Apr 27, 2022 at 15:41
• @erez next time please provide the data so we don't have to speculate and create our own. Commented Apr 27, 2022 at 15:42