It has been many years since the last time that I used latex but I am trying to engage again.
I put together a graph and I am trying to draw curly brackets vertically on the bars from y axes (for example 15 - until 25).
I am failing to get it right as I can not understand the coordinates.
I found this questions very useful but I am not able to understand how to do it Draw Curly Braces in TikZ
Sample of code:
\documentclass{article}
\usepackage{subcaption}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usetikzlibrary{decorations.pathmorphing}
\begin{document}
\pgfplotstableread[row sep=\,col sep=&]{
interval & traffic \
Monday & 20 \
Tuesday & 100 \
Wednesday & 70 \
Thursday & 40 \
Friday & 80 \
Saturday & 30 \
Sunday & 30 \
}\mydata
\begin{figure}[!htb]
% \begin{subfigure}{\textwidth}
\begin{tikzpicture}
\begin{axis}[
ybar,
bar width=.5cm,
% width=\textwidth,
height=.5\textwidth,
legend style={at={(0.5,1)},
anchor=north,
legend columns=-1},
symbolic x coords={Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday},
xtick=data,
x tick label style={rotate=45,anchor=east},
nodes near coords,
nodes near coords align={vertical},
ymin=0,
ymax=140,
%xlabel={Car},
ylabel={Percentage %},
]
\addplot[yellow!10!black,fill=yellow!90!white] table [x=interval,y=traffic]{\mydata};
\addplot[dashed,line legend,sharp plot,nodes near coords={},
update limits=false,shorten >=-3mm,shorten <=-3mm]
coordinates {(Monday,85) (Sunday,85)}
node[midway,above]{neutral};
\draw [decorate,decoration={brace,amplitude=10pt},xshift=-4pt,yshift=0pt]
(Monday) -- (Monday) node [black,midway,xshift=-0.6cm]
{\footnotesize $P_1$}; % here is where it fails
\legend{Monitored Traffic}
\end{axis}
\end{tikzpicture}
\caption{Average Observed Traffic}
% \end{subfigure}
\end{figure}
\end{document}
Sample of output without the code that is failing:
Ps: is there a way to trim the lines on the top x axis?

