Hello i have a bar graph with only 2 quantities and id like to make it so each quantity has the same error bar (e.g. all the red bars have error A and all the orange bars have error B). Thank you
\documentclass[border=10pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.3}
\definecolor{mygray}{HTML}{c7c7c7}
\definecolor{myblue}{HTML}{4385f5}
\definecolor{myred}{HTML}{ea4136}
\definecolor{myorange}{HTML}{fcbc05}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
ybar=0pt,
enlarge x limits=0.06,
% (merged both styles)
legend style={
at={(0.5,-0.15)},
anchor=north,
legend columns=-1,
draw=none,
/tikz/every even column/.append style={column sep=0.3cm},
},
height=6cm,
width=10cm,
ymajorgrids,
tick align=inside,
ymin=0,
ymax=20,
ytick distance=2,
ylabel={Amplitud (grados)},
y axis line style={opacity=0},
tickwidth=0pt,
ylabel={Amplitud (grados)},
symbolic x coords={medida 1, medida 2, medida 3, medida 4, medida 5, medida 6},
xtick=data,
nodes near coords,
every node near coord/.append style={font=\tiny},
bar width=13pt,
cycle list={
{fill=myred,draw=black},
{fill=myorange,draw=black},
{fill=myblue,draw=black},
{fill=myorange,draw=black}%
},
error bars/y dir=both,
error bars/y fixed=2,
]
\addplot coordinates {(medida 1,10) (medida 2,11) (medida 3,12) (medida 4,13) (medida 5, 14) (medida 6, 15)};
\addplot coordinates {(medida 1,7) (medida 2,8) (medida 3,8) (medida 4,8) (medida 5, 9) (medida 6, 9)};
\legend{Amplitud inicial $\theta_i$, Amplitud final $\theta_f$ }
\end{axis}
\end{tikzpicture}
\end{document}