Graphics, Figures & Tablespgfplots | Animation in Presentation

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
duboismathieu
Posts: 18
Joined: Tue Apr 01, 2008 1:09 pm

pgfplots | Animation in Presentation

Post by duboismathieu »

Hello,

I have recently discovered pgfplots and I wanted to use it for a beamer presentation.

The figure is a bar chart (more precisely ybar meaning vertical bars). There are several (symbolic) x values and several plots. Here is a simple example (borrowed from pgfplots manual p27):

Code: Select all

\begin{tikzpicture}
\begin{axis}[
ybar,
enlargelimits=0.15,
legend style={at={(0.5,-0.15)},
anchor=north,legend columns=-1},
ylabel={\#participants},
symbolic x coords={tool8,tool9,tool10},
xtick=data,
nodes near coords,
nodes near coords align={vertical},
]
\addplot coordinates {(tool8,7) (tool9,9) (tool10,4)};
\addplot coordinates {(tool8,4) (tool9,4) (tool10,4)};
\addplot coordinates {(tool8,1) (tool9,1) (tool10,1)};
\legend{used,understood,not understood}
\end{axis}
\end{tikzpicture}
What I would like to do is to x values one after another: slide 1 should show the three bar for tool8, slide 2 adds the three bars of tool9, etc...

Any idea?
Thanks in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Post Reply