pgfplots icon indicating copy to clipboard operation
pgfplots copied to clipboard

Minor ticks in log axis missing

Open tndrle opened this issue 3 years ago • 2 comments

This is based on a question on TeX.SE: https://tex.stackexchange.com/q/642981/263192

I'm missing some minor y ticks in a logarithmic pgfplots axis:

This has been generated with:

\begin{tikzpicture}
\begin{axis}[
    ymode=log,
    ymax=31,
]
    \addplot[only marks] coordinates {(0,0.1) (1,11)};
\end{axis}
\end{tikzpicture}

Notice that ymax=31, so I would expect minor y ticks at y = 20 and y = 30.

If I change ymax slightly to 32, it works as expected:

Full MWE:

\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
    ymode=log,
    ymax=31,
]
    \addplot[only marks] coordinates {(0,0.1) (1,11)};
\end{axis}
\end{tikzpicture}

\begin{tikzpicture}
\begin{axis}[
    ymode=log,
    ymax=32,
]
    \addplot[only marks] coordinates {(0,0.1) (1,11)};
\end{axis}
\end{tikzpicture}
\end{document}

tndrle avatar May 15 '22 07:05 tndrle

I have the same problem on the xaxis. Is this behaviour intended?

judober avatar Oct 10 '22 13:10 judober