Take the 2-minute tour ×
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.

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
add comment

1 Answer

up vote 19 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
add comment

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.