# How to project nodes created by relative position on curve to axis and below?

In case I have two curves created with I can draw a line between two relatively positioned nodes on each. In this example there is an arrow between the points at 50% of each curve.

\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
\begin{axis}[]

x y
1 1
2 2
3 3
}
node [pos=0.5,inner sep=0pt,outer sep=0pt] (A) {};

x y
1 2
2 3
}
;

x y
2 1
3 2
}
node [pos=0.5,inner sep=0pt,outer sep=0pt] (B) {};

\draw[latex-latex] (A) -- (B);

\end{axis}
\end{tikzpicture}
\end{document}


But how can I set just one node and get a second and third one projected on each axis?

And how to get a node outside the axis relatively to the one set on the curve?

So basically I'm looking for the red nodes in the following picture and like to draw the red lines and green lines?

Any help? There are questions around which could solve my problem, but they all aim at different things and I miss the essential parts.

You can use the rel axis cs inside the axis to draw the green lines and set named coordinates at the projected points.

\draw[green,very thick]
(A|-{rel axis cs:0,0})coordinate(Ax)--(A)--({rel axis cs:0,0}|-A)coordinate(Ay);


Then you can draw the red nodes and lines outside the axis.

\draw[red,very thick]
(Ax)node{\pgfuseplotmark{square*}}--+(0,-5mm)node{\pgfuseplotmark{square*}}
(Ay)node{\pgfuseplotmark{square*}}--+(-5mm,0)node{\pgfuseplotmark{square*}};


Code:

\documentclass[margin=5pt]{standalone}
\pgfplotsset{compat=1.12}
\begin{document}
\begin{tikzpicture}
\begin{axis}
x y
1 1
2 2
3 3
}
node [pos=0.5,inner sep=0pt,outer sep=0pt] (A) {};
x y
1 2
2 3
}
;
x y
2 1
3 2
}
node [pos=0.5,inner sep=0pt,outer sep=0pt] (B) {};
\draw[latex-latex] (A) -- (B);
\draw[green,very thick]
(A|-{rel axis cs:0,0})coordinate(Ax)--(A)--({rel axis cs:0,0}|-A)coordinate(Ay);
\end{axis}
\draw[red,very thick]
(Ax)node{\pgfuseplotmark{square*}}--+(0,-5mm)node{\pgfuseplotmark{square*}}
(Ay)node{\pgfuseplotmark{square*}}--+(-5mm,0)node{\pgfuseplotmark{square*}};
\end{tikzpicture}
\end{document}