You can simply use two axes that you position relative to each other.
Here's an example where I've defined a new key axis break gap
that can be used to set the gap between the axes:

\documentclass[border=5mm]{standalone}
\usepackage{pgfplotstable}
\tikzset{
axis break gap/.initial=1mm
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
name=bottom axis,
domain = 0:pi,
scale only axis,
width=8cm, height=4cm,
axis x line*=bottom
]
\addplot [smooth] {-cos(deg(x))^6/10+0.2};
\addplot [smooth] {-cos(deg(x))^6/10+0.4};
\end{axis}
\begin{axis}[
at=(bottom axis.north),
anchor=south, yshift=\pgfkeysvalueof{/tikz/axis break gap},
domain = 0:pi,
scale only axis,
width=8cm, height=4cm,
axis x line*=top,
xticklabel=\empty,
after end axis/.code={
\draw (rel axis cs:0,0) +(-2mm,-1mm) -- +(2mm,1mm)
++(0pt,-\pgfkeysvalueof{/tikz/axis break gap})
+(-2mm,-1mm) -- +(2mm,1mm)
(rel axis cs:1,0) +(-2mm,-1mm) -- +(2mm,1mm)
++(0pt,-\pgfkeysvalueof{/tikz/axis break gap})
+(-2mm,-1mm) -- +(2mm,1mm);
}
]
\addplot [smooth] {-cos(deg(x))^6+2};
\addplot [smooth] {-cos(deg(x))^6+4};
\end{axis}
\end{tikzpicture}
\end{document}