The following presentation depicts an empty circle emerging on frame 2. The color of the circle then proceeds to toggle between blue and red.
This presentation was produced with the following code.
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{overlay-beamer-styles}
\begin{document}
\begin{frame}{Frame \thepage}
\[
\begin{tikzpicture}
\draw[
, ultra thick
, visible on=<{2,3,5}>
, fill=blue
, fill on=<{3,5}>
] circle (2cm);
\draw[
, ultra thick
, visible on=<{4, 6}>
, fill=red
, fill on=<{4, 6}>
] circle (2cm);
\end{tikzpicture}
\]
\end{frame}
\end{document}
Here, the blue circles are defined separately from the red circles. I'm curious if it's possible to simplify this code by combining everything into one \draw
command. I've tried doing
\draw[
, ultra thick
, visible on=<{2-}>
, fill=blue
, fill on=<{3,5}>
, fill=red
, fill on=<{4, 6}>
] circle (2cm);
but this ignores all the blue circles:
Is there anything else I can do?