[Tex/LaTex] Prevent PGFplots from using 10^notation on y-axis

pgfplots

I want the y-axis labels to be labeled 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10,000, …

PGFplots insists on keeping the 10^-notation in the following minimal example.

\documentclass[border=5mm]{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{loglogaxis}[y tick label style={/pgf/number format/fixed},
grid=both,
major grid style={black!50},xlabel={x},ylabel={y}]

\addplot[only marks, mark size=4pt,mark=triangle,fill,black] coordinates{
(0.000001, 13.5e3)
(0.0000024, 11.975e3)
(0.004, 4340)
(1 , 3840)
(10  , 2550)
(100 ,  2357)
(257, 2290)
(315, 2280)};

\end{loglogaxis}
\end{tikzpicture}
\end{document} 

Best Answer

To have both axes in logarithmic scale, but print the labels for only one of them in fixed point format, you can use the approach from pgfplots log ticks with fixed point: only for one axis?:

\documentclass[border=5mm]{article}
\usepackage{pgfplots}

\pgfplotsset{
  log x ticks with fixed point/.style={
      xticklabel={
        \pgfkeys{/pgf/fpu=true}
        \pgfmathparse{exp(\tick)}%
        \pgfmathprintnumber[fixed relative, precision=3]{\pgfmathresult}
        \pgfkeys{/pgf/fpu=false}
      }
  },
  log y ticks with fixed point/.style={
      yticklabel={
        \pgfkeys{/pgf/fpu=true}
        \pgfmathparse{exp(\tick)}%
        \pgfmathprintnumber[fixed relative, precision=3]{\pgfmathresult}
        \pgfkeys{/pgf/fpu=false}
      }
  }
}

\pgfplotsset{compat=1.9}

\begin{document}
\begin{tikzpicture}
\begin{loglogaxis}[
log y ticks with fixed point,
ytick={2000,4000,8000,16000},
grid=both,
major grid style={black!50},xlabel={x},ylabel={y}]

\addplot[only marks, mark size=4pt,mark=triangle,fill,black] coordinates{
(0.000001, 13.5e3)
(0.0000024, 11.975e3)
(0.004, 4340)
(1 , 3840)
(10  , 2550)
(100 ,  2357)
(257, 2290)
(315, 2280)};

\end{loglogaxis}
\end{tikzpicture}
\end{document}