I'm currently making a bar plot with pgfplots and have numbers in percent on the x axis. I want to show the values directly at the bars for which I use nodes near coords. But because the values are given as numerical, I need to add the % by hand. I could this for the axis labels via xticklabel={\pgfmathprintnumber{\tick}\textsf{\%}}, but this didn't work for the nodes near coords.
I tried the point meta command, but it didn't work as expected. I read through the manual chapter 4.8, but couldn't find any help regarding adding a simple symbol to the nodes label.
Here's my MWE, which yields the (almost) wanted result, without the percent-symbols at the bars values:
\documentclass[border=1pt]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xbar,
height=5cm,
width=12cm,
axis y line*=left,
axis x line*=bottom,
enlarge y limits=0.3,
%%%
xmin=0, xmax=20,
xticklabel={\pgfmathprintnumber{\tick}\textsf{\%}},
%%%
symbolic y coords={one, two, three},
ytick=data,
nodes near coords,
% point meta={x},
]
\addplot[
draw=black!30,
fill=black!30
]
coordinates {(10,one) (18,two) (5,three)};
\addplot[
draw=black!70,
fill=black!70
]
coordinates {(9,one) (8,two) (7,three)};
\end{axis}
\end{tikzpicture}
\end{document}
Using something like point meta={x\%} only yields errors and I couldn't find any working solution.
Best regards