I am trying to draw lines between two different tikz-drawings, placed in subfig-environments, for example the corners of the small blue rectangle in the left image and the corners of the axis environment of the right image.

As the two figures will become very large, I need to export them with externalize. Therefore I'd also like to use the subfig library and not groupplots.
I thought it would work with the remember picture and the overlay keywords, but first attempts only brought errors, so I fear there might be a conflict with remember picture and externalize. I already found a good description how to reference corners of a rectangle.
Is it possible to draw lines as indicated in the sample picture? Is it possible in combination of externalize and subfig (if not I would prefer groupplots and externalize before subfig and no externalize, though the overlay image don't need to be 'externalized')?
Here is my minimum example:
\documentclass[parskip]{scrartcl}
\usepackage{tikz,pgfplots,subfig, lipsum}
% \usetikzlibrary{external}
% \tikzexternalize[figure list=true]
\begin{document}
\lipsum[1]
\begin{figure}[h]
\centering
\subfloat[Overview.]{
\begin{tikzpicture}[trim axis left, trim axis right]
\begin{axis}[domain=-10:10,x post scale=0.5]
\addplot+[red,mark=none]{x^2};
\draw[fill=blue,opacity=0.3] (axis cs:-2,-0.5) rectangle (axis cs:2,5);
\end{axis}
\end{tikzpicture}
}\quad
\subfloat[Detail.]{
\begin{tikzpicture}[trim axis left, trim axis right]
\begin{axis}[xmin=-2,xmax=2,ymin=-0.5,ymax=5,domain=-2:2,mark=none]
\addplot+[red,mark=none]{x^2};
\end{axis}
\end{tikzpicture}
}
\caption{Curve.}
\end{figure}
\lipsum[2]
\end{document}
Thanks a lot!

remember picturewith two externalized pictures or can it still work somehow? As a work-around your proposition @Matz could work, I'll try it later if there's no different approach. – kromuchi Aug 19 '12 at 12:55.pdfimages of the graphics so that you can add them as external files. What you want is to make images standalone but still draw over them which still requires yet another tikzpicture. Instead of group plots you can use two axis environments in one picture. Scope the second and shift it to the right. – percusse Aug 19 '12 at 13:36