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

First, this forum has been a great resource for me for some time now. I recently started using pgfplots and tikz, so some things I still need to figure out. I hope my question will be clear and the MWE is ok...

I export my plots from Matlab using matlab2tikz. Some of my data happens to be in a range as shown, where standard precision on the ticklabels is not sufficient to distinguish them (everything is labeled as "1" on the y-axis). I can do the format change manually in each plot, but I really would rather do it using \pgfplotsset before my actual tikzpictures begin. What should I add to the \pgfplotsset command to achieve this?


    every axis plot post/.append style={line width = 2pt}}

[title=Trying to set precision with pgfplotsset]
\addplot +[domain=0:1] {(x+rnd)/4000+1};

title=Precision set manually inside tikzpicture,
    /pgf/number format/.cd,
\addplot +[domain=0:1] {(x+rnd)/4000+1};

share|improve this question

closed as too localized by percusse, Paulo Cereda, Joseph Wright Sep 9 '12 at 14:03

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

You can simply move the /pgf/number format/.cd,fixed,precision=4 to \pgfplotsset{} , or am I missing the point? – percusse Sep 9 '12 at 13:52
I tried all sorts of things, except for the obvious... it works, haha! Thank you very much! – Kutscher Sep 9 '12 at 13:55
My pleasure. Welcome to the club of the confused :D Is it OK for you if we close this question as too localized since the problem is solved? – percusse Sep 9 '12 at 13:57
Yes, fantastic! – Kutscher Sep 9 '12 at 13:58

Browse other questions tagged or ask your own question.