TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
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 '14 at 21:51
you're right, sry – endo.anaconda Feb 17 '14 at 23:12
up vote 8 down vote accepted

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}:


    scaled y ticks=base 10:-6,
    ytick scale label code/.code={},
    yticklabel={\pgfmathprintnumber{\tick} million}
\addplot {rand*1e7};

share|improve this answer
bah, don't you have a phd or something? I'm typing very nicely and peacefully here :P – percusse Feb 17 '14 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 '14 at 22:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.