[pstricks] Questions about pst-node

Michael Sharpe msharpe at ucsd.edu
Fri May 7 22:10:16 CEST 2010

On May 7, 2010, at 8:12 AM, Martin Chicoine wrote:

> Hi all,
> I use pst-node to draw the following diagram. I have some questions:
> 1) Why is the "Wide Gray Common Box 1" not well centered on the central
> arrow?
> 2) Is there a way to draw the top and bottom horizontal arrows without
> having to specify the 2cm offsets?
> 3) Is there a better way to draw the gray frame?

Marco's answer is good but did not address all your questions, so here's some more information.

The "Wide Gray Common Box 1" doesn't center well because the node is constructed as an \Rnode, where the center is by default .7ex above the baseline. (Settable with keyword vref.) You can change this by using mnode=r so it constructs an \rnode.

The gray frame underneath can be constructed without ad hoc coordinates using the following method, which draws the underlying frame with 10pt border around the title and the first 3 boxes. This requires drawing the psmatrix twice. (You'll need the most recent version of pst-node to get \nodexn.)


\newcommand{\cadre}[1]{\fcolorbox{black}{cyan}{\parbox{5cm}{\centering #1}}}

 \rnode[tl]{TL}{\colorbox{lightgray}{\parbox{5cm}{\centering Title}}} & \\
 \cadre{Box 1\\ (B1)} & \\
 \cadre{Box 2\\ (B2)} & 
   \rput[b]{-90}{\colorbox{lightgray}{Wide Gray Common Box 1}} \\
 \rnode[br]{BR}{\cadre{Box 3\\ (B3)}} & \\
 \cadre{Box 4\\ (B4)}  \\


More information about the PSTricks mailing list