I'm following the example from Axis break in pgfplots
However, I found that you get a spurious vertical space on the plots
Any way to remove it? And why is it there?
\documentclass[convert]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{pgfplots.groupplots}
\begin{document}
\pgfplotsset{every non boxed x axis/.style={}}
\fbox{\begin{tikzpicture}%
\begin{groupplot}[
group style={
group name=my fancy plots,
group size=1 by 2,
xticklabels at=edge bottom,
vertical sep=0pt
},
width=8.5cm,
xmin=-6, xmax=6
]%
%
\nextgroupplot[ymin=45,ymax=80,
ytick={60,80},
axis x line=top,
axis y discontinuity=parallel,
height=4.5cm]%
\addplot {x*0};%
\addplot {x^2+50};%
%
\nextgroupplot[ymin=0,ymax=5,
ytick={0},
axis x line=bottom,
height=2.0cm]%
\addplot {x*0};%
\addplot {x^2+50};%
\end{groupplot}%
\end{tikzpicture}}
\end{document}



\useasboundingboxin a TikZ picture. – Henri Menke Sep 26 '18 at 21:39