I have this code.
\begin{figure}
\begin{tikzpicture}
\begin{axis}[
title=Overhead of the monitoring system,
title style={yshift=1.3ex},
y tick label style={
/pgf/number format/precision=2,
/pgf/number format/fixed,
/pgf/number format/fixed zerofill,},
ymin=0,
xtick={1,2},xticklabels={Monitored,Non-monitored},
enlarge x limits=0.15,
ylabel=Duration in seconds,
ybar,
bar width=25pt,
]
\addplot+[
error bars/.cd,
y dir=both,
y explicit
]
table [y error=error] {
x y error label
1 113.68 1.64 1
2 110.41 1.72 2
};
\end{axis}
\end{tikzpicture}
\caption{Overhead introduced by monitoring and storing the traces versus non-monitoring. As we can see the latency is minimum }
\label{fig:ovmonitoring}
\end{figure}
The result is
However I want to have a different color for the bar on the right (label=2). I have seen examples in the documentation with scatter plots but I cannot find anything with bars. How can I color each bar depending on the label?