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

How can I change the type of the decimal/thousand separator from the american one to the european one? More precisely, I want:

  • "1000" to be written as is, instead of "1,000"
  • "0,1" instead of "0.1"
share|improve this question
up vote 43 down vote accepted

The number formatting is changed using the /pgf/number format keys, which are described starting on page 546 of the pgfmanual. In your case, you would want to set /pgf/number format/use comma to set the comma as the decimal separator, and /pgf/number format/1000 sep={} to suppress separators for the groups of thousands.

When setting several subkeys, you can save yourself a bit of typing by first changing to the main key using /pgf/number format/.cd, and then setting the number formats.

Since I assume you want the number format to be consistent all through your plot, you should set the options for the whole axis.

Here's an example:



    /pgf/number format/.cd,
        use comma,
        1000 sep={}]
\addplot +[domain=0:1] {(x+rnd)*4000};


share|improve this answer
Do you know if it is possible to have pgfplots(and TikZ) to format numbers like \num{} from the siunitx package (ftp.dante.de/tex-archive/help/Catalogue/entries/siunitx.html). -Like my numbers in the rest of the document. – Hans-Peter E. Kristiansen Dec 10 '11 at 17:50
@Hans-PeterE.Kristiansen: Yes, you can set xticklabel=\num[round-mode=places,round-precision=1]{\tick} (or similar). – Jake Dec 11 '11 at 1:24
I think a new option like american number format or european number format could be useful here (this is a comment for @ChristianFeuersänger). Otherwise, if one uses siunitx, the number format should be gathered from the options set in that package. – Luigi Dec 17 '12 at 16:55

Edit: As per Jake's comments: using set decimal separator={,} instead of use comma introduces an unwanted thin space after the comma. Interestingly, if you use set decimal separator={.}, this doesn't happen. So, better to use use comma instead as per Jake's solution.

Use set thousands separator={} and set decimal separator={,} which yields:

enter image description here


      y tick label style={/pgf/number format/.cd,%
          scaled y ticks = false,
          set thousands separator={},
      x tick label style={/pgf/number format/.cd,%
          scaled x ticks = false,
          set decimal separator={,},
  \addplot coordinates {
share|improve this answer
Use set decimal separator={{,}} to avoid this behavior. – Patrick Bergner Dec 23 '12 at 18:45
@PatrickBergner I have tried this and it is not improving the situation. Any idea? – Magpie Mar 10 '13 at 14:34
@Magpie: Without more details it is difficult to help. I'd suggest posting a new question. You should refer to this question and show exactly how this did not improve the situation. – Peter Grill Mar 10 '13 at 20:49
@PeterGrill it's ok I fixed it. See answer below. Thanks! – Magpie Mar 10 '13 at 21:27
@Magpie: In some countries (like Germany) a comma is used as the decimal separator and a period as the thousands separator. It's just a convention. – Jake Mar 10 '13 at 23:43

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.