I used to do this according to Andrew's solution until I read his note #2, and it reminded me that PGF's keys can do pretty much anything. The key (excuse the pun) is to create a key that processes other keys conditional on the slide number:
\tikzset{onslide/.code args={<#1>#2}{%
\only<#1>{\pgfkeysalso{#2}}
}}
Using \pgfkeysalso doesn't reset the current key path, whereas \pgfkeys or \tikzset would. The .code args key handler means that
onslide=<overlay specification>{keys}
causes the the following code to be expanded:
\only<overlay specification>{\pgfkeysalso{keys}}
Then you can use the key onslide=<overlay specification>{keys} to set keys only on specific slides. The slightly inelegant twist is that if your overlay specification contains commas the entire pair of overlay spec and keys has to be embraced.
Here is a complete example:
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{positioning}
\tikzset{onslide/.code args={<#1>#2}{%
\only<#1>{\pgfkeysalso{#2}} % \pgfkeysalso doesn't change the path
}}
\tikzset{temporal/.code args={<#1>#2#3#4}{%
\temporal<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}{\pgfkeysalso{#4}} % \pgfkeysalso doesn't change the path
}}
\tikzstyle{highlight}=[red,ultra thick]
\begin{document}
\begin{frame}
\begin{figure}[h]
\begin{centering}
\begin{tikzpicture}[
system/.style={draw,rectangle,rounded corners=3,minimum width=2cm,text width=1.8cm,text centered},
node distance=2cm
]
\node [system,onslide=<3->{highlight},anchor=center] (fe) {Feature Extraction};
\node [system,onslide={<2,4>{green}}] (am) [right=of fe.center] {Acoustic Model};
\node [system,temporal=<3>{blue}{highlight}{green}] (lm) [right=of am.center] {Language Model};
\node [system] (d) [below=of lm.center] {Decoder};
\draw[->] (fe) |- (am);
\draw[->] (am) |- (d);
\draw[->] (lm) -- (d.north);
\end{tikzpicture}
\end{centering}
\end{figure}
\end{frame}
\end{document}
You will be disappointed about the jiggling of your picture when the line thickness keys are applied. You might have to avoid relative positioning to make that go away.
For more on key handlers like .code args, see the pgfkeys section of the TikZ-PGF manual.
\temporalbut failed. Of course one can use 3onslideoptions to achieve the behavoir of\temporal. But still, can you add an example that uses\temporaldirectly? Thanks. – Tyson Williams Jan 04 '13 at 19:46onsideandtemporalare just the names of the keys..code argsis a special key handler that creates a macro. – Matthew Leingang Jun 29 '16 at 20:20\tikzsetbefore\begin{document}. That is, I tried to place it just before mytikzpictureand got some errors... – Seamus Jan 31 '17 at 14:24