I would like that my histogram has areas in background (with name), in order to compare the value of each bar with some intervals. This is the result that I would like to reach:
And this what I reached till now:
The 2 change of colors are set at 0.35 and 0.62. The code I used is this:
\begin{filecontents*}{WHCs.dat}
Sample y y_err
5-Pa-Pr 0.520 0.10
6-Pa-Pr 0.465 0.05
7-Pa-Pr 0.768 0.16
5-Pa-S 0.517 0.10
6-Pa-S 0.562 0.20
7-Pa-S 0.794 0.35
\end{filecontents*}
\begin{tikzpicture}
\begin{axis}[
ybar, ymin=0,
bar width=15pt,
x tick label style={rotate=45, anchor=east},
major x tick style = transparent,
ymajorgrids = true,
xtick = data,
scaled y ticks = false,
symbolic x coords={5-Pa-Pr, 6-Pa-Pr, 7-Pa-Pr, 5-Pa-S, 6-Pa-S, 7-Pa-S},
ymajorgrids]
\addplot+[error bars/.cd, y dir=both,y explicit] table [x=Sample, y=y, y error=y_err] {WHCs.dat};
\end{axis}
\end{tikzpicture}


