If I have three parts of paths and nodes in a tikzpicture: what is the best way to split that up with a foreach-loop into 3 tikzpictures, where only one part is showing?
Like:
,
,
\documentclass[margin=5pt, tikz]{standalone}
\usepackage{tikz}
\begin{document}
\foreach \part in {1,...,3}{
\begin{tikzpicture}[
mystyle/.style={->, thin, font=\sffamily\tiny, blue, text=black, inner sep=0.5pt, very near start},
]
% 1:
\draw[mystyle] (140:1.2) -- +(0.6,0.05) node[mystyle, above]{1};
% 2:
\draw[mystyle, purple] (163:0.9) -- +(0.9,0.05) node[mystyle, above]{2};
% 3:
\draw[mystyle, red, rounded corners=3] (200:0.6) -- ++(-0.3,-0.3) -- ++(0.4,-0.4) node[mystyle, below]{3};
\node[fill=red, circle, minimum width=2mm] at (210:0.1) {};
\end{tikzpicture}
}
\end{document}
beamer
class (also withstandalone
) and its overlay feature for this.standaloneframe
(from thestandalone
package) combined with theoverlay-beamer-styles
library.