[pstricks] displaying parts of tree in beamer with pstree

Herbert Voss Herbert.Voss at FU-Berlin.DE
Wed Sep 24 08:40:50 CEST 2008


Florian Ederer schrieb:

> 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.

\only didn't reserves the "unseen" space

> 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.

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

\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}}
         {\uncover<2->{%
         \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}}
         {\uncover<3->{%
         \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}}
         {\uncover<4->{%
         \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}}
         {\uncover<5->{%
         \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}


Herbert



More information about the PSTricks mailing list