0

I'm trying to draw a simple TikZ tree

\begin{tikzpicture}[level distance=1cm,
  level 1/.style={sibling distance=4cm}]

\node{Data Mining}
    child { node {Statistiques}}
    child { node {Intelligence artificielle}}
    child { node {Informatique}}

;
\end{tikzpicture}

I need to do a simple animation to display a node each time (first node then first and second then first second and third). If someone can help me. Thank you.

  • 1
    Welcome! Please can you complete your code? It matters a great deal what class you are using, for example! – cfr Nov 20 '16 at 14:03
2

You may typeset nodes in white to hide them.

\begin{tikzpicture}[level distance=1cm, level 1/.style={sibling distance=4cm}]
\node{Data Mining}
    child { node {Statistiques}}
    child[white] { node {Intelligence artificielle}}
    child[white] { node {Informatique}};
\end{tikzpicture}

\begin{tikzpicture}[level distance=1cm, level 1/.style={sibling distance=4cm}]
\node{Data Mining}
    child { node {Statistiques}}
    child { node {Intelligence artificielle}}
    child[white] { node {Informatique}};
\end{tikzpicture}

\begin{tikzpicture}[level distance=1cm, level 1/.style={sibling distance=4cm}]
\node{Data Mining}
    child { node {Statistiques}}
    child { node {Intelligence artificielle}}
    child { node {Informatique}};
\end{tikzpicture}

enter image description here

0

thank you for your answer, its not exactly what i want but i found how to do it

\begin{tikzpicture}
    \matrix (magic) [matrix of nodes,ampersand replacement=\&, column sep=4mm, row sep=2mm]{
        \node (Info) [draw,shape=rectangle,visible on=<2->] {Informatique}; \&
        \node (data) [draw,shape=circle,visible on=<1->] {Data Mining}; \&
        \node (stat) [draw,shape=rectangle,visible on=<3->] {statistiques}; \\
        \&
        \node (Intel) [draw,shape=rectangle,visible on=<4->] {Intelligence artificielle}; \\
    };
        \draw[->, thick,visible on=<2->] (data) -- (Info);
        \draw[->, thick,visible on=<3->] (data) -- (stat);
        \draw[->, thick,visible on=<4->] (data) -- (Intel);
\end{tikzpicture}

thank you.

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.