[pstricks] Drawing state diagrams

Runar Gjelsvik Runar.Gjelsvik at cern.ch
Wed Feb 16 18:03:17 CET 2005


Hi,

I'm looking to draw some state diagrams. I've used this code:

%
%
\psmatrix[mnode=circle,colsep=1] 
& & & ReadADC \\
LoadFrame & & Idle \\
& & & StoreRegs \\
\endpsmatrix
\psset{shortput=nab,arrows=->,labelsep=3pt}
\small
\ncarc[arcangle=40,border=3pt]{2,3}{1,4}
\ncarc[arcangle=80,border=3pt]{1,4}{3,4}
\ncarc[arcangle=40,border=3pt]{3,4}{2,3}
\ncarc[arcangle=40,border=3pt]{2,3}{2,1}
\ncarc[arcangle=40,border=3pt]{2,1}{2,3}
%
%

This works OK, BUT, the circles are of different sizes and that doesn't
look to good. I've tried to add mnodesize but it has no affect.

I've managed to change the size of the circles by using:

\psmatrix[mnode=C,radius=1cm,colsep=1] 

But in this case the text disappears, I only get white cirles.


Help would be appreciated.

Cheers,

Runar




More information about the PSTricks mailing list