I've this problem with tikz package. I'm creating a plot in the x-range [0; 10000] (in my real plot, up to 100000) but the xticklabels are in the form [0, 0.2, 0.4, 0.6, 0.8, 1] and at the end of the axis there is 10^4. I'd like to get the xticklabels in the form [0, 2000, 4000, 6000, 8000, 10000]. Can anyone help me? Thanks in advance.
\documentclass[a5paper]{article}
\usepackage{tikz,pgfplots,amsmath}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}
\begin{axis}[%
width=8cm,
height=5cm,
scale only axis,
xmin=0,
xmax=10000,
xlabel={f [Hz]},
xmajorgrids,
xtick={0,2000,4000,6000,8000,10000},
xticklabel=\pgfmathprintnumber{\tick},
ymin=-50,
ymax=150,
ylabel={k [1/m]},
ymajorgrids,
ytick={-50,0,50,100,150},
yticklabels={ $-50$, $ 0 $, $50$, $100$, $150$},
]
\addplot [
color=blue,
solid,
line width=1.0pt,
forget plot
]
table[row sep=crcr]{
1 0.00124080134369962\\
11.000900090009 0.01365024490508\\
1941.17461746175 2.40866649072482\\
10001.900090009 12.4105748087962\\
};
\end{axis}
\end{tikzpicture}%
\end{document}
y tick label style={/pgf/number format/fixed}from his answer as well? If it doesn't work, please edit your example code, and we could reopen the question if necessary. – Torbjørn T. Jan 07 '14 at 10:44