1

I currently have a frame with a tikzpicture and nodes. But i d'ont know how to show only one node and the others in gray, next frame will contain some text and the next frame will makes visible the first and the second node and stay the others in gray, etc... I already tried "pause" optiono, but this is not what I'm looking...

Ex:

frame1 node 1 visible, the others gray

frame2 blablabla blablabla

frame3 node 1 and 2 visible, the others gray.. etc...

frame4 blablabla blablabla

My code is :

\documentclass{beamer}
\usepackage{tikz}
\tikzstyle{m_rectangle} = [rectangle, align=center, rounded corners, minimum width=2cm, minimum height=1.5cm, draw=black]
\tikzstyle{arrow} = [thick,->,>=stealth]

\begin{document}

\begin{frame}{Test frame}
\begin{figure}
\centering
\vspace{-.3cm}
\begin{tikzpicture}[node distance=2cm]
    \hspace{-.5cm}
    \node (in) [m_rectangle, fill=red!30] {1};
    \node (chapeau) [m_rectangle, right of=in, xshift=1cm, fill=blue!30] {2};
    \node (fortran) [m_rectangle, below of=chapeau, yshift=-.1cm, fill=yellow!30] {3};
    \node (all) [m_rectangle,  right of=chapeau, xshift=1.5cm, fill=green!30] {4};
    \node (fiab) [m_rectangle, above of=all, yshift=.1cm, fill=green!30] {5};
    \node (moy) [m_rectangle, below of=all, yshift=-.1cm, fill=green!30] {6};
    \node (out) [m_rectangle, right of=all, xshift=1cm, fill=red!30] {7};
    \draw [arrow] (in) -- (chapeau);
    \draw [arrow] (in) -- (fortran);
    \draw [arrow] (chapeau) -- (fortran);
    \draw [arrow] (chapeau) -- (fiab);
    \draw [arrow] (chapeau) -- (all);
    \draw [arrow] (chapeau) -- (moy);
    \draw [arrow] (out) -- (fiab);
    \draw [arrow] (out) -- (all);
    \draw [arrow] (out) -- (moy);
\end{tikzpicture}
\caption{Figure caption}
\end{figure}
\end{frame}

\end{document}

Thanks in advance guys,

Loris

1

I'm not really sure exactly what you wanted, but you can probably accomplish what you want with the use of

\setbeamercovered{transparent}

which will make covered items transparent, and

\uncover<>{}

around the nodes that are not always fully visible

\documentclass{beamer}
\usepackage{tikz}

\tikzstyle{m_rectangle} = [rectangle, align=center, rounded corners, minimum width=2cm, minimum height=1.5cm, draw=black]
\tikzstyle{arrow} = [thick,->,>=stealth]

\begin{document}

\begin{frame}{Test frame}
\setbeamercovered{transparent}
\begin{figure}
\centering
\vspace{-.3cm}
\begin{tikzpicture}[node distance=2cm]
    \hspace{-.5cm}
    \node (in) [m_rectangle, fill=red!30] {1};
    \uncover<2>{\node (chapeau) [m_rectangle, right of=in, xshift=1cm, fill=blue!30] {2};}
    \node (fortran) [m_rectangle, below of=chapeau, yshift=-.1cm, fill=yellow!30] {3};
    \node (all) [m_rectangle,  right of=chapeau, xshift=1.5cm, fill=green!30] {4};
    \node (fiab) [m_rectangle, above of=all, yshift=.1cm, fill=green!30] {5};
    \uncover<3>{\node (moy) [m_rectangle, below of=all, yshift=-.1cm, fill=green!30] {6};}
    \node (out) [m_rectangle, right of=all, xshift=1cm, fill=red!30] {7};
    \draw [arrow] (in) -- (chapeau);
    \draw [arrow] (in) -- (fortran);
    \draw [arrow] (chapeau) -- (fortran);
    \draw [arrow] (chapeau) -- (fiab);
    \draw [arrow] (chapeau) -- (all);
    \draw [arrow] (chapeau) -- (moy);
    \draw [arrow] (out) -- (fiab);
    \draw [arrow] (out) -- (all);
    \draw [arrow] (out) -- (moy);
\end{tikzpicture}
\caption{Figure caption}
\end{figure}
\end{frame}

\end{document}
| improve this answer | |
0

I solved the problem using opacity feature of tikz.

cf :

\documentclass[10pt]{beamer}
\mode<presentation>
{
    \usetheme{Warsaw}
    \setbeamercovered{transparent}
}

\usepackage{tikz}

\tikzset{invisible/.style={opacity=0.1},
                    visible on/.style={alt={#1{}{invisible}}},
                        alt/.code args={<#1>#2#3}{%
                            \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} 
                        },
}

\tikzstyle{m_rectangle} = [rectangle, align=center, rounded corners, minimum width=2cm, minimum height=1.5cm, draw=black, visible on=<1->]
\tikzstyle{i_rectangle} = [rectangle, align=center, rounded corners, minimum width=2cm, minimum height=1.5cm, draw=black, invisible]
\tikzstyle{arrow} = [thick,->,>=stealth, visible on=<1->]
\tikzstyle{i_arrow} = [thick,->,>=stealth, invisible]

\begin{document}
\begin{frame}{Test}
        \begin{figure}
            \centering
            \vspace{-.3cm}
            \begin{tikzpicture}[node distance=2cm]
                \hspace{-.5cm}
                \node (in) [m_rectangle, fill=red!30] {1};
                \node (chapeau) [i_rectangle, right of=in, xshift=1cm, fill=blue!30] {2};
                \node (fortran) [i_rectangle, below of=chapeau, yshift=-.1cm, fill=yellow!30] {3};
                \node (all) [i_rectangle,  right of=chapeau, xshift=1.5cm, fill=green!30] {4};
                \node (fiab) [i_rectangle, above of=all, yshift=.1cm, fill=green!30] {5};
                \node (moy) [i_rectangle, below of=all, yshift=-.1cm, fill=green!30] {6};
                \node (out) [i_rectangle, right of=all, xshift=1cm, fill=red!30] {7};
                \draw [i_arrow] (in) -- (chapeau);
                \draw [i_arrow] (in) -- (fortran);
                \draw [i_arrow] (chapeau) -- (fortran);
                \draw [i_arrow] (chapeau) -- (fiab);
                \draw [i_arrow] (chapeau) -- (all);
                \draw [i_arrow] (chapeau) -- (moy);
                \draw [i_arrow] (out) -- (fiab);
                \draw [i_arrow] (out) -- (all);
                \draw [i_arrow] (out) -- (moy);
            \end{tikzpicture}
        \caption{Block diagram}
        \end{figure}
    \end{frame}

    \begin{frame}{Test}
        \begin{itemize}
        \Large{
            \item BlaBlaBla
            \item BlaBlaBla
            \item BlaBlaBla
        }
        \end{itemize}
    \end{frame}

    \begin{frame}{Test}
        \begin{figure}
            \centering
            \vspace{-.3cm}
            \begin{tikzpicture}[node distance=2cm]
                \hspace{-.5cm}
                \node (in) [m_rectangle, fill=red!30] {1};
                \node (chapeau) [m_rectangle, right of=in, xshift=1cm, fill=blue!30] {2};
                \node (fortran) [i_rectangle, below of=chapeau, yshift=-.1cm, fill=yellow!30] {3};
                \node (all) [i_rectangle,  right of=chapeau, xshift=1.5cm, fill=green!30] {4};
                \node (fiab) [i_rectangle, above of=all, yshift=.1cm, fill=green!30] {5};
                \node (moy) [i_rectangle, below of=all, yshift=-.1cm, fill=green!30] {6};
                \node (out) [i_rectangle, right of=all, xshift=1cm, fill=red!30] {7};
                \draw [arrow] (in) -- (chapeau);
                \draw [i_arrow] (in) -- (fortran);
                \draw [i_arrow] (chapeau) -- (fortran);
                \draw [i_arrow] (chapeau) -- (fiab);
                \draw [i_arrow] (chapeau) -- (all);
                \draw [i_arrow] (chapeau) -- (moy);
                \draw [i_arrow] (out) -- (fiab);
                \draw [i_arrow] (out) -- (all);
                \draw [i_arrow] (out) -- (moy);
            \end{tikzpicture}
        \caption{Block diagram}
        \end{figure}
    \end{frame}

        \begin{frame}{Test}
        \begin{itemize}
        \Large{
            \item BlaBlaBla
            \item BlaBlaBla
            \item BlaBlaBla
        }
        \end{itemize}
    \end{frame}

    \begin{frame}{Test}
        \begin{figure}
            \centering
            \vspace{-.3cm}
            \begin{tikzpicture}[node distance=2cm]
                \hspace{-.5cm}
                \node (in) [m_rectangle, fill=red!30] {1};
                \node (chapeau) [m_rectangle, right of=in, xshift=1cm, fill=blue!30] {2};
                \node (fortran) [m_rectangle, below of=chapeau, yshift=-.1cm, fill=yellow!30] {3};
                \node (all) [i_rectangle,  right of=chapeau, xshift=1.5cm, fill=green!30] {4};
                \node (fiab) [i_rectangle, above of=all, yshift=.1cm, fill=green!30] {5};
                \node (moy) [i_rectangle, below of=all, yshift=-.1cm, fill=green!30] {6};
                \node (out) [i_rectangle, right of=all, xshift=1cm, fill=red!30] {7};
                \draw [arrow] (in) -- (chapeau);
                \draw [arrow] (in) -- (fortran);
                \draw [arrow] (chapeau) -- (fortran);
                \draw [i_arrow] (chapeau) -- (fiab);
                \draw [i_arrow] (chapeau) -- (all);
                \draw [i_arrow] (chapeau) -- (moy);
                \draw [i_arrow] (out) -- (fiab);
                \draw [i_arrow] (out) -- (all);
                \draw [i_arrow] (out) -- (moy);
            \end{tikzpicture}
        \caption{Block diagram}
        \end{figure}
    \end{frame}
\end{document}

Regards

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.