I'd like to have the customized text node labels for nodes near coords
, For example, instead of the numbers (7,10,15 …) on the right side of each bar, I'd like to have some text.
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[scale=0.85]
\begin{axis}[xbar,tick align=outside,
width=11cm,
height=8cm,
bar width={10pt},
enlargelimits=0.13,
nodes near coords,
nodes near coords align=horizontal,
xlabel=\textbf{Number of Finals Won},
xtick={10,20,30,40,50,60},
ytick={1,2,3,4,5,6},
yticklabels={Kerry,Laois,London,Waterford,Clare,Offaly},
xticklabels={a,b,c,d,e,f,g},
]
\addplot
[draw=blue,fill=blue!15]
coordinates
{(10,1) (15,2) (10,3) (35,4) (30,5) (40,6)};
\addplot
[draw=blue,fill=red!15]
coordinates
{(10,1) (10,2) (20,3) (50,4) (7,5) (22,6)};
\end{axis}
\end{tikzpicture}
\end{document}
Thanks.
Best Answer
Because you weren't very specific I guessed that you meant something like the following ...