TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

When creating a plot like this one

\documentclass{article}

\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture} 
        \begin{axis} 
                \addplot coordinates {
                (0.01,0.01)
                (0.09,0.09)
                };
        \end{axis}
\end{tikzpicture}
\end{document}

pgfplot uses the following xticklabels:

produced output

Is there any way to make pgfplots create labels as 0.01,0.02,... without specifying them all manually using xticklabels and yticklabels?

share|improve this question
up vote 38 down vote accepted

Section 4.12 Number formatting options from pgfplots manual sends you to pgfplotstable manual where in section 2.7 Number formatting options you can find the solution.

\documentclass[border=3mm]{standalone}

\usepackage{pgfplots}
\begin{document}

\begin{tikzpicture} 
        \begin{axis}[scaled ticks=false, tick label style={/pgf/number format/fixed} ]
                \addplot coordinates {
                (0.01,0.01)
                (0.09,0.09)
                };
        \end{axis}
\end{tikzpicture}
\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

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.