pgf-tikz/pgfplots

Combination of ymode=log, axis discontinuity and axis x line=top expands bounding box below axis

Opened this issue · 0 comments

Origin: https://tex.stackexchange.com/a/637782/

Essentially, with the combination of axis options in the example below, the bounding box looks to be extended below the axis, see screenshot at the bottom. Uncommenting any of the three first options makes the problem go away, while uncommenting the ymin/ymax options makes it worse.

This looks like a bug to me, but apologies if I've missed something obvious.

\documentclass[border=5mm]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
    ymode=log,
    axis y discontinuity=parallel,
    axis x line=bottom,
    % ymin=1e9,ymax=1e10, % uncommenting this makes the added space larger
]
    \addplot coordinates {(1,3e9)};

\end{axis}
\draw (current bounding box.south east) rectangle (current bounding box.north west); % to indicate the bounding box
\end{tikzpicture}
\end{document}

image