I would like for the nodes of my forest to be visible sequentially. The code below makes the text sequential, but still shows the boxes for each item. How can I make it so the boxes and text appear sequentially?
Here's my mwe:
\documentclass[xcolor={dvipsnames}]{beamer}
\usepackage{tikz}
\usepackage{forest}
\usepackage{pgfkeys}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{frame}
\tikzset{
invisible/.style={opacity=0, text opacity=0},
visible on/.style={alt=#1{}{invisible}},
alt/.code args={<#1>#2#3}{%
\alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}
},
block/.style={rectangle, draw, fill=white!20, text width=2.75cm, text centered, rounded corners, minimum height=1.4cm},
line/.style={draw, very thick, color=black!80, -Stealth},
}
\forestset{
visible on/.style={
for tree={
/tikz/visible on={#1},
edge+={/tikz/visible on={#1}}}}}
\begin{forest}
arrow to/.style n args=2{%
delay={%
tikz+={%
\draw [every edge, line] () -- (!#1) node [above, midway] {#2};
},
},
!u.s sep+=30pt,
},
before typesetting nodes={%
where n=1{%
edge label/.wrap value={%
node [left,pos=.75, anchor=mid east] {#1}
},
}{%
edge label/.wrap value={%
node [right,pos=.75, anchor=mid west] {#1}
},
},
},
for tree={%
grow=east,
parent anchor=east,
child anchor=west,
calign=edge midpoint,
edge+=->,
block,
edge={line},
l sep+=10pt,
},
forked edges
[\visible<1->{some text}
[\uncover<2->{some more text}
[\uncover<3->{even more text}]
[\uncover<3->{more text again}]
[\uncover<3->{even some more text}]
]
[\uncover<2->{the last text}
]
]
\end{forest}
\end{frame}
\end{document}
Thank you!
Updated the code: Thanks for pointing out it didn't compile. There was an extra { I removed.
Code from: Positioning and layout in Forest

visible onetc.? Also, please include a link if you used code you found elsewhere. I can track it down, but it's easier if you link and, if it is from SE, the licence requires it (unless the author has dual-licensed it). – cfr Oct 11 '23 at 15:16