I wrote the following tikz code
\documentclass[10pt]{beamer}
\usetheme{Warsaw}
\usetikzlibrary{calc, shapes, snakes, decorations.markings, patterns, , arrows.meta}
\usetikzlibrary{backgrounds} % For testing with "framed" option to look at the bounding box
\newcommand{\smallbead}[1]{\draw[fill] #1 circle [radius=0.1em]}
\begin{document}
\begin{frame}
\begin{figure}[H]
%\label{}
\centering
\begin{tikzpicture}[
single arrow/.style = {decoration={markings, mark=at position 0.5 with {\arrow{>}}}, postaction={decorate}},
double arrow/.style = {decoration={markings, mark=at position 0.5 with {\arrow{>>}}}, postaction={decorate}},
hatched/.style = {pattern=north west lines, opacity=0.3},
]
\begin{scope}[xshift=2cm]
\coordinate (F1) at (-1, 2);
\coordinate (F2) at (1, 2);
\coordinate (E1) at (-2, 1);
\coordinate (E3) at (0, 1);
\coordinate (E2) at (2, 1);
\coordinate (V) at (0, 0);
\node [circle, above left] at (F1) {$f_1$};
\node [above right] at (F2) {$f_2$};
\node [left] at (E1) {$e_1$};
\node [right] at (E2) {$e_2$};
\node [above] at (E3) {$e_3$};
\node [below] at (V) {$v$};
\smallbead{(F1)};
\smallbead{(F2)};
\smallbead{(E1)};
\smallbead{(E2)};
\smallbead{(E3)};
\smallbead{(V)};
\draw [single arrow] (V) [bend left] to (E1);
\draw [single arrow] (V) [bend right] to (E1);
\draw [single arrow] (V) [bend left] to (E3);
\draw [single arrow] (V) [bend right] to (E3);
\draw [single arrow] (V) [bend left] to (E2);
\draw [single arrow] (V) [bend right] to (E2);
\draw [single arrow] (E1) to (F1);
\draw [single arrow] (E1) to (F2);
\draw [single arrow] (E2) to (F1);
\draw [single arrow] (E2) to (F2);
\end{scope}
\end{tikzpicture}
\end{frame}
\end{document}
to generate the following diagram
I want to use this diagram while giving a presentation.
For better exposition, I want to display diagram not in one single frame but in 3 different frames.
The first frame is supposed to display only the dots and their labels.
The second frame is supposed to display the contents of the first frame along with the arrows from the lowest level to the intermediate level.
The third frame is supposed to display the whole of the diagram.
Of course, I can achieve this my writing 3 different codes, one for each frame. But is there a smarter way?
EDIT: I have used a user-defined command \smallbead
to but dots at the places I want.
\only<slidenumber>{content}
, e.g. for a line only on the second and third slide:\only<2-3>{ \draw [single arrow] (E2) to (F2);}
\begin{document}
etc....\smallbead
, so it doesn't have to reverse-engineered. Same for thesingle arrow
style. It is boring and wasting time having to go through a lot of work just to make a snippet compilable (we often like to test solutions before posting). As Faekynn says, a complete minimal working example is much better. On some occasions, although perhaps not this one, I'll grant you that, an MWE is essential to be able to answer the question.