TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When working with pgf-tikz, I can create overlays in beamer presentations with

\path<overlay specification> ...

However, I could not get this to work in pgfplots graphics. It would be nice if something like

\addplot<2-> {...};

worked as expected, but it does not. Any ideas?

share|improve this question

Well, it seems that

\only<overlay specification>{\addplot { ... };}

works fine, so problem solved. I had tried with the commands \visible and uncover but it did not work.

share|improve this answer
\draw, \path, and \node are overlay-specification-aware, but \addplot comes from another package built on top of pgf and isn't. \only works because it either includes or throws away its argument, whereas \uncover will try to set it in invisible ink, which it's not set up to do within a tikzpicture. The only drawback of \only over \uncover is you might need to manually correct the bounding box. – Matthew Leingang Dec 6 '10 at 19:57
Thanks for the tip. It is clear for me now. – rgallego Dec 7 '10 at 19:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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