# Set ticks precision with pgfplotsset [closed]

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?

\documentclass{article}
\usepackage{tikz,pgfplots}

\begin{document}
\pgfplotsset{%
every axis plot post/.append style={line width = 2pt}}

\begin{tikzpicture}
\begin{axis}
[title=Trying to set precision with pgfplotsset]
\end{axis}
\end{tikzpicture}%

\begin{tikzpicture}
\begin{axis}[
title=Precision set manually inside tikzpicture,
/pgf/number format/.cd,
fixed,precision=4]
\end{axis}
\end{tikzpicture}

\end{document}

-

## 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