[pstricks] displaying parts of tree in beamer with pstree

Florian Ederer ederer at MIT.EDU
Wed Sep 24 04:42:40 CEST 2008


Hi,

I am trying to use pstree in beamer such that subtrees are displayed 
only later on. I have drawn the trees but now I want to unravel them 
such that I first show the first branches and then the lower branches. I 
tried a few commands (\only etc.) but it didn't work.

In particular, I want to display the root and nodes 1-4 in the first 
part. Then when I click I want to display nodes 1.1-1.4, then another 
click for nodes 2.1-2.4 and so on.

Many thanks for any help. It is much appreciated.

Kind Regards,
Florian


The program is:

\documentclass[10pt,dvips,notes=hid]{beamer}
\usepackage{pstricks,pst-tree,pst-plot,pst-node}

\begin{document}

\begin{frame}
\frametitle{Title}
\begin{center}
\pstree[treemode=R,linewidth=0.4pt,treesep=0.3,levelsep=4.5,nodesep=2pt]{\TR{root}}
     {
     \pstree[nodesep=2pt]{\Tr{node 1}^{branch 1}}
         {
         \Tr{\tiny node 1.1}
         \Tr{\tiny node 1.2}
         \Tr{\tiny node 1.3}
         \Tr{\tiny node 1.4}
         }
     \pstree[nodesep=2pt]{\Tr{node 2}^{branch 2}}
         {
         \Tr{\tiny node 2.1}
         \Tr{\tiny node 2.2}
         \Tr{\tiny node 2.3}
         \Tr{\tiny node 2.4}
         }
     \pstree[nodesep=2pt]{\Tr{node 3}_{branch 3}}
         {
         \Tr{\tiny node 3.1}
         \Tr{\tiny node 3.2}
         \Tr{\tiny node 3.3}
         \Tr{\tiny node 3.4}
         }
     \pstree[nodesep=2pt]{\Tr{node 4}_{branch 4}}
         {
         \Tr{\tiny node 4.1}
         \Tr{\tiny node 4.2}
         \Tr{\tiny node 4.3}
         \Tr{\tiny node 4.4}
         }
     }

\end{center}
\end{frame}
\end{document}



Many thanks,
Florian




More information about the PSTricks mailing list