# Describing leaves of a tree with an underbrace using pstree/pstricks

I'd like to have a discription for some of the leaves. It doesn't need to be an underbace, if somebody has better graphical suggestions... :)

Consider this example:

\pstree[levelsep=35pt]{\Tcircle{$\rho$}}
{
\Tf*
\Tf*
\psset{linestyle=none}  \Tr{$\cdots$} \psset{linestyle=solid}
\Tf*
\Tf*
\Tf*
\psset{linestyle=none}  \Tr{$\cdots$} \psset{linestyle=solid}
\Tf*

}


I'm thinking about something like this, which of won't work that way:

\pstree[levelsep=35pt]{\Tcircle{$\rho$}}
{
\underbrace{
\Tf*
\Tf*
\psset{linestyle=none}  \Tr{$\cdots$} \psset{linestyle=solid}
\Tf*
}_{n \mbox{trees}}
\underbrace{
\Tf*
\Tf*
\psset{linestyle=none}  \Tr{$\cdots$} \psset{linestyle=solid}
\Tf*
}_{n \mbox{trees}}
}

-

Every tree works like a node. SO you can name the node to use it later. The brace is drawn with \psbrace:

\documentclass{scrartcl}
\usepackage{pstricks}
\usepackage{pst-node,pst-tree}
\begin{document}
\pstree[levelsep=35pt]{\Tcircle{$\rho$}}
{
\Tf*[name=first]
\Tf*
{\psset{linestyle=none}  \Tr{$\cdots$}}
\Tf*[name=second]
\Tf*
\Tf*
{\psset{linestyle=none}  \Tr{$\cdots$}}
\Tf*
}
\psbrace*[linecolor=blue,ref=lC]([nodesep=5pt,angle=-165]first)([nodesep=5pt,angle=-15]second){\rotatebox{90}{$n$ trees}}
\end{document}​

-
Instead of setting & resetting the linestyle, use grouping to modify it locally. – Werner Dec 28 '11 at 18:07
Hope you don't mind, I edited your answer a little. Roll back if you don't approve. – Werner Dec 28 '11 at 19:18
@Werner: I had to go yesterday. Thanks for the very good improvements. – Marco Daniel Dec 29 '11 at 9:10
I tried to do the same again, but with \Tfan instead of \Tf this time. But somehow it doesn't look fine. Could you explain the part with angle? How did you find these numbers? – lumbric Jan 17 '12 at 22:07
After some googeling, I decided that this is a seperate question, so I asked it here. – lumbric Feb 7 '12 at 11:39
\documentclass{scrartcl}
\begin{document}

\pstree[levelsep=1.2cm]{\Tcircle{$\rho$}}{
\Tf*[name=first]
\Tf*
\Tn{\ldots}
\Tf*[name=second]
\Tf*
\Tf*
\Tn{\ldots}
\Tf*}
\psbrace*[linecolor=blue,ref=tC,rot=90,nodesep=2mm]([angle=-165]first)([angle=-15]second){Text II}
\end{document}


-