Despite multiple ordinates and axes discontinuities appearing adjacent in the pgfplots manual, achieving both in the same plot is proving difficult.
Specifically, I have the following pgfplots plot with two y-axes (see MWE below)
I would like to have an x-axis discontinuity that breaks the x-axis into 2 intervals: the first ranging from (-4,-3) and the second ranging from (0,4). I would like to retain the border to the graph in the style of the answer to this post, which has a discontinuity on the y-axis. I have tries updating it with no success and i'm not sure how to adapt the answer to a plot with double y-axes.
Any help is appreciated.
MWE
\documentclass[tikz]{standalone}
\usepackage{pgf,pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\pgfplotsset{set layers}
\begin{axis}[scale only axis,
xlabel={$x$},
ylabel={Ordinate 1},
axis y line*=left,
xmin=-4.0, xmax=4.0
]
\addplot[red] {x^2}; \label{plot_one}
\end{axis}
\begin{axis}[scale only axis,
ylabel={Ordinate 2},
xmin=-4.0, xmax=4.0,
axis y line*=right,
axis x line=none,
]
\addlegendimage{/pgfplots/refstyle=plot_one}\addlegendentry{plot 1}
\addplot[blue] {x}; \label{plot_two}
\addplot[green] {3*x}; \label{plot_three}
\addlegendentry{plot 2}
\addlegendentry{plot 3}
\end{axis}
\end{tikzpicture}
\end{document}

