# [pstricks] Get x- and y-coordinate from node

Poul Riis poul.riis at skolekom.dk
Wed Sep 23 17:58:16 CEST 2015

I would like to get the x- and y-coordinates from a node.
I found the correspondence here
http://tug.org/pipermail/pstricks/2006/003965.html
but it doesn't seem to work?

Poul Riis

Martin Sievers wrote:> I ask for your help for the following problem: I
want to plot two> function f,g on [xmin,xmax] which have an intersection
point S=(s1,s2).> The tricky thing about it is, that I want to plot the
functions> differently on [xmin,s1] and [s1,xmax], for example red and
blue.> As I only know S, but not the coordinates s1 and s2 themselves, I
wonder> how I can achieve that.it's possible, but only on PS side
Herbert
tletter\def\getXfromNode#1{%   [ http://tug.org/mailman/listinfo/pstricks
]tx at NodeDict begin /N@#1 load GetCenter end   pop \[
http://tug.org/mailman/listinfo/pstricks ]pst at number\psxunit div
}\makeatother\begin{document}\begin{pspicture}(0,0)(12,8)\psset{algebraic,comma,llx=-0.75cm,lly=-0.75cm,urx=0.75cm,Dy=5,Dx=1,labelFontSize={\footnotesize},xAxisLabel={$t$},yAxisLabel={$p$}}\begin{psgraph}{->}(0.0,0)(7.25,27){10.50cm}{7.25cm}\pstInter
FF{25 Euler x neg 0.25 mul exp mul}{10 Euler x neg 0.1 mul
expmul}{6}{S}\psplot[plotpoints=200]{0}{\getXfromNode{S}}{25*Euler^(-0.25*x)}\psplot[plotpoints=200]{0}{\getXfromNode{S}}{10*Euler^(-0.1*x)}\psplot[plotpoints=200,linestyle=dashed]{\getXfromNode{S}}{7}{25*Euler^(-0.25*x)}\psplot[plotpoints=200,linest
yle=dashed]{\getXfromNode{S}}{7}{10*Euler^((0.25-0.1)*x)}\end{psgraph}\end{pspicture}\end{document}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20150923/57cd4488/attachment.html>