# axis lable in millions/thousands

I have a simple barchart, on the y axis i have values which are displayed full written (e.g. 5'000'000). I dont want to change the orginal data but change the y-axis lable into a fullwritten value e.g. "5 Mio."

Any Idea how to approach this target, I tried but couldn't find anything useful.The only thing I found is something for tables, and I think it should be possible whith barcharts as well, any hint ? I guess I need to have a temporary value which devides just the lable on the y-axis

cheers endo

-
It would be helpful if you composed a fully compilable MWE including \documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem. –  Peter Grill Feb 17 at 21:51
you're right, sry –  endo.anaconda Feb 17 at 23:12

You can scale all the tick labels by a common factor using scaled y ticks=base 10:-6 (dividing by 10^6). To switch off the scaling label, set ytick scale label code/.code={}. To add the word million after each label, set yticklabel={\pgfmathprintnumber{\tick} million}:

\documentclass{article}
\usepackage{pgfplots}
\begin{document}

\pgfplotsset{compat=1.9}
\begin{tikzpicture}
\begin{axis}[
scaled y ticks=base 10:-6,
ytick scale label code/.code={},
yticklabel={\pgfmathprintnumber{\tick} million}
]
\end{axis}
\end{tikzpicture}

\end{document}

-
bah, don't you have a phd or something? I'm typing very nicely and peacefully here :P –  percusse Feb 17 at 22:40
@percusse: Hehe! Actually, starting a "real" job in two weeks. PhD'ing isn't for me, it turns out. I see Word and Excel looming ahead... –  Jake Feb 17 at 22:41