I would like to define overlays (in the Beamer sense) in figures designed using the tikz-network package.
For instance, say I have the following figure:
\documentclass{standalone}
\usepackage{tikz}
\usepackage{tikz-network}
\begin{document}
\begin{frame}
\begin{tikzpicture}
\Vertex[x=0.0, y=1.0, label=$v_1$]{v1}
\Vertex[x=1.0, y=1.0, label=$v_2$]{v2}
\Vertex[x=2.0, y=1.0, label=$v_3$]{v3}
\Edge[color=black](v1)(v2)
\Edge[color=black](v2)(v3)
\end{tikzpicture}
\end{frame}
\end{document}
and that I want node v1 to disappear at step 2. I have tried using the visible on key proposed here: https://tex.stackexchange.com/a/136166/31360 and which looks like this:
\documentclass{beamer}
\usepackage{tikz}
\usepackage{tikz-network}
\tikzset{
invisible/.style={opacity=0},
visible on/.style={alt={#1{}{invisible}}},
alt/.code args={<#1>#2#3}{%
\alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path
},
}
\begin{document}
\begin{frame}
\begin{tikzpicture}
\Vertex[x=0.0, y=1.0, label=$v_1$, visible on=<2->]{v1}
\Vertex[x=1.0, y=1.0, label=$v_2$]{v2}
\Vertex[x=2.0, y=1.0, label=$v_3$]{v3}
\Edge[color=black](v1)(v2)
\Edge[color=black](v2)(v3)
\end{tikzpicture}
\end{frame}
\end{document}
But it does not seem to work with tikz-network, as I get a "Package xkeyval Error: 'on visible' undefined in families 'vertex'" error. I guess the solution is to extend the key to vertex (and to edge as well), but I do not know how to do that.


\alt, you need in one way or another involvebeamer. And you need to switch to thetikzdirectory with\Vertex[x=0.0, y=1.0, label=$v_1$,style={visible on=<2->}]{v1}. – Oct 30 '19 at 21:00