pgf-tikz / pgfplots

pgfplots - A TeX package to draw normal and/or logarithmic plots directly in TeX in two and three dimensions with a user-friendly interface and pgfplotstable - a TeX package to round and format numerical tables. Examples in manuals and/or on web site.
http://pgfplots.sourceforge.net/
187 stars 33 forks source link

Minor ticks in log axis missing #435

Open tndrle opened 2 years ago

tndrle commented 2 years ago

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}
judober commented 1 year ago

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

lbaeni commented 1 week ago

This issue is a duplicate of #180. A pull request (#478) has been submitted.