I would like to join a node inside a pgfplots axis to a node belonging to a different tikzpicture. I can do this with an overlay from inside the axis. However, if I scale the tikzpicture that encloses the axis, the overlay breaks.
For example, the following works fine:
\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[remember picture]
\node (n1) {n1};
\end{tikzpicture}
\begin{tikzpicture}[remember picture]
%\begin{tikzpicture}[remember picture, scale=0.85, transform shape]
\node (n2) {n2};
\draw[overlay, green] (n1) -- (n2);
\begin{axis}[right of=n2, name=plot, clip=false]
\addplot coordinates {(0,0) (2,3) (4,2)};
\draw[overlay, red] (n1.east) -- (axis cs:2,3);
\end{axis}
\end{tikzpicture}
\end{document}
When I add a scale parameter (e.g. scale=0.85 with transform shape) to the tikzpicture outside the axis (and run pdflatex twice), the red line no longer starts from the node (n1):

Everything works fine if the scale is a parameter of the axis, but I would like to scale the whole tikzpicture. Is there a way to make this work correctly?

scaleparameter to theaxis, only the plot dimensions, but not the text labels will be scaled, and the number of tick labels may be different. The behaviour is basically as if you had supplied different values forwidthandheight. Is that what you want, or do you actually want to scale the plot, text and all? – Jake May 22 '12 at 11:45