24

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?

28

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.

  • 12
    \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
  • 5
    Six years later, I googled this issue and stumbled on my own comment. Wish I could vote it up! – Matthew Leingang Sep 28 '16 at 15:19

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.