I am trying to draw a graph with percentage in x-axis and categories on y-axis. I cannot make the graph to show % sign. Here is my MWE:
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\pagestyle{empty}
\usetikzlibrary{patterns}
\begin{document}
\begin{tikzpicture}
\begin{axis}
[
axis lines*=left,
title=Histogram of S\&P 500 CEOs Past Experience,
xbar,
width=8cm,
height=5cm,
xlabel={},
symbolic y coords={Sales, Marketing, Finance, Operations},
ytick=data,
xmin=0,
xmax=0.5,
nodes near coords,
nodes near coords align={horizontal}
]
\addplot
[draw=blue,pattern=horizontal lines light blue]
coordinates
{(0.17,Sales) (0.24,Marketing) (0.31,Finance) (0.42,Operations)};
\end{axis}
\end{tikzpicture}
\end{document}
as you can see, I can make the graph with decimal number and ideally I'd like to have % sign. Any suggestion?



%sign? After every x tick label? On the bar labels? Also, in your real application, are you only going to show four or five bars? In that case, you might want to get rid of the x axis, since all the needed information is already in the bar labels. – Jake Dec 17 '12 at 22:23%sign after each label. I mean 17% instead of 0.17, 24% instead of 0.24 etc... – N Nik Dec 17 '12 at 22:28