# Log axis in pgfplots

When I add the log ticks with fixed point option, pgfplots ignores the x-axis range instead of just affecting the y-axis.

without log ticks with fixed point

with log ticks with fixed point

\documentclass{standalone}
\usepackage{pgfplotstable}
\pgfplotsset{width = 3in, compat = 1.6}

\begin{document}
\begin{tikzpicture}
\begin{semilogyaxis}[log ticks with fixed point]
[
scale only axis,
xmin=0.4, xmax=2.1,
ymin=1e-4, ymax=0.1,
]
\end{semilogyaxis}
\end{tikzpicture}
\end{document}


My goal is to make a plot with y axis in ppm (parts per million). I want to avoid multiplying all the values in the table by 1e6 instead just want to change the labels by multiplying them by 1e6. How can I do this? Right now I am manually changing the tick marks to get right display. I do this by adding ytickten={-4,-3,-2,-1}, yticklabels={100, 1000, 10000, 100000}. How can I make this automatic?

-

You have to merge the options into ONE option list:

\begin{semilogyaxis}
[
log ticks with fixed point,
scale only axis,
xmin=0.4, xmax=2.1,
ymin=1e-4, ymax=0.1,
]


in your example, the second option list is ignored and produces warnings in your .log file.

-
thank you, it was silly of me to not realize that. any suggestions on second part of the question for changing the y tick labels? – mythealias Jan 20 '13 at 19:51
Hmm. Take a look at the units library which is shipped with pgfplots. If that is not what you want, you should take a look at section "Tick Scaling - Common Factors In Ticks" in the pgfplots manual. I suppose that might be what you want here. – Christian Feuersänger Jan 20 '13 at 20:27