# How to pass the abscissa of a node to the first 2 mandatory arguments of \psplot?

How to pass the abscissa of a node to the first 2 mandatory arguments of \psplot? I have tried \psGetCenterNode but it produced an error in PS interpreting phase.

\documentclass[border=12pt,pstricks]{standalone}

\def\foo{x \psPi\space div 180 mul sin}
\def\goo{x \psPi\space div 180 mul cos}
\def\hoo{x}
\begin{document}
\begin{pspicture}[showgrid=bottom](0,-2)(5,2)
\psplot[linecolor=red]{0}{4.5}{\foo}
\psplot[linecolor=blue]{0}{4.5}{\goo}
\pstInterFF{\foo}{\goo}{0}{A}
\pstInterFF{\foo}{\goo}{4}{B}
%\psplot{A.x}{B.x}{\hoo} <== does NOT work!
\end{pspicture}
\end{document}

-

\documentclass{article}
\usepackage{pst-plot,pst-eucl}

\def\hoo{x}
\begin{document}
\begin{pspicture}[showgrid=bottom](0,-2)(5,2)
\psplot[linecolor=red]{0}{4.5}{\foo}
\psplot[linecolor=blue]{0}{4.5}{\goo}
\pstInterFF{\foo}{\goo}{0}{A}
\pstInterFF{\foo}{\goo}{4}{B}
\psplot{\psGetNodeCenter{A} A.x}{\psGetNodeCenter{B} B.x}{\hoo}
\end{pspicture}

\end{document}


-
Sorry. How to make \def\f(#1){#1 1 add} usable in \psline(!0 \f(0))? –  Weirdstress Function Aug 9 '12 at 13:48
The first 2 mandatory arguments of \psplot can accept RPN without !. It is a bit confusing because usually coordinates and angles need ! when they are specified in RPN. –  Weirdstress Function Aug 11 '12 at 18:28
it is not confusing, because they are always real PostScript expressions and nothing else. –  Herbert Aug 11 '12 at 19:48