# cline, offset

Bernd Brandt bernd at bio.vu.nl
Tue Sep 19 11:22:38 CEST 2000

-----------------------------------------------------------------------------
This is the PSTricks mailing list, devoted to discussions about computational
graphics in (La)TeX using the PSTricks package from Timothy van Zandt.
For help using this mailing list, see instructions at the end of message.
-----------------------------------------------------------------------------

Dear all,

A few months ago i received a way to draw nodes with labels.
I have constructed a psmatrix withtwo lines with an offset now.
How can i make the labels, which are put below and above the line,
follow the offset? Furthermore i used a dummy node, with a fixed
position where it should connect with the line. Is there a way to
automate this as well? (depending on the colsep, rowsep, and offset?

\begin{pspicture}(0,-2.5)(9,5)\showgrid
\begin{psmatrix}[colsep=3,rowsep=1,mnode=circle]
& [name=E01]\MyBox{$E_{01}$} \\[0pt]
[name=E00]\MyBox{$E_{00}$} &           & [name=E11]\MyBox{$E_{11}$} \\
& [name=E10]\MyBox{$E_{10}$}
% Node connections
\psset{nodesep=5pt,offset=4pt,arrows=->}
% LABELS DO NOT 'OBEY' OFFSET
\ncline{E00}{E01}^{$\lambda_A$}_{\rnode{XA1}{$A$}}

\ncline{E01}{E00}

%This is the fixed dummy node:
\ncput[npos=0.9]{\pnode{X1}}
\nccurve[nodesepA=0.1,nodesepB=0,ncurv=0.6,angleA=30, angleB=200]{-}{XA1}{X1}
\ncline{E00}{E10}^{$\lambda_B$}_{\rnode{XB2}{$B$}}
\ncput[npos=0.9]{\pnode{X2}}
\nccurve[nodesepA=0.1,nodesepB=0,ncurv=0.9,angleA=0, angleB=160]{-}{XB2}{X2}
\ncline{E01}{E11}^{$\lambda_B$}_{\rnode{XB2}{$B$}}
\ncput[npos=0.9]{\pnode{X3}}
\nccurve[nodesepA=0.1,nodesepB=0,ncurv=0.9,angleA=0, angleB=160]{-}{XB2}{X3}
\ncline{E10}{E11}^{$\lambda_A$}_{\rnode{XA2}{$A$}}
\ncput[npos=0.9]{\pnode{X4}}
\nccurve[nodesepA=0.1,nodesepB=0,ncurv=0.6,angleA=30,angleB=200]{-}{XA2}{X4}
\nccurve[ncurv=1,angle=-90]{E11}{E00}_{$\lambda_H$}
\end{psmatrix}
\end{pspicture}

I am looking forward to receiving some tips

Thanks.

Bernd Brandt

-----------------------------------------------------------------------------