I want to specify some xticks in a log-log plot (tikzpicture). This works fine, but they are always printed in exponential format (with basis 10). In general this is fine, but for one plot I would like to changes this. Is it possible?
1 Answer
You can use the option log ticks with fixed point
.
\documentclass[10pt,a4paper]{article}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{semilogxaxis}[
unbounded coords=discard,
log basis x=10,
log ticks with fixed point
]
\addplot coordinates {
(0,1)
(5,2)
(10,3)
(50,4)
(100,5)
(500,6)
(1000,7)
(5000,8)
(10000,9)
(100000,10)}
;
\end{semilogxaxis}
\end{tikzpicture}
\end{document}
If you need to specify it for one axis only, you can look at the answer to this question : pgfplots: log ticks with fixed point on one logarithm axis .
xticklabels={10,100,1000,10000,100000,100000}
to the options of your axis.