Is it possible to extract a part of a tikzpicture?
See for example this tikzpicture. I would like to show the parts with different colors on different slides. (The real picture is more complex, wide and cant be divided in different tikzpictures.)
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}
\begin{tikzpicture}
\draw[fill=green] (0.0, 0.0) rectangle (3.0, 2.0);
\draw[fill=blue] (3.0, 0.0) rectangle (6.0, 2.0);
\draw[fill=red] (6.0, 0.0) rectangle (9.0, 2.0);
\end{tikzpicture}
\end{frame}
\end{document}
If its also possible to animate the views (from left to right) like you have a window for the current view and drag it to the next part of the picture I would like to see a solution for that, too.
Update: I just found the \clip-Command. By this I get a copy paste solution: Three slides with the code above and additional commands
\clip (0.0, 0.0) rectangle (3.0, 2.0);
\clip (3.0, 0.0) rectangle (6.0, 2.0);
\clip (6.0, 0.0) rectangle (9.0, 2.0);
\transpush[direction=180,duration=X]whereXis the number of seconds you want for your transition. This line has to be inserted between the\begin{frame}and the\end{frame}commands. – Ludovic C. Jun 24 '13 at 15:33\clip<1> (0.0, 0.0) rectangle (3.0, 2.0); \clip<2> (3.0, 0.0) rectangle (6.0, 2.0); \clip<3> (6.0, 0.0) rectangle (9.0, 2.0);– Herr K. Jun 24 '13 at 16:34\clippaths discussed here clip also half of the line away. Even better is to use the<overlay>syntax for the\draws orvisible onstyle that makes the path temporarily invisible. – Qrrbrbirlbel Jun 24 '13 at 16:58