Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for beamer overlays #53

Open
zsunberg opened this issue Sep 3, 2016 · 7 comments
Open

Support for beamer overlays #53

zsunberg opened this issue Sep 3, 2016 · 7 comments

Comments

@zsunberg
Copy link
Contributor

zsunberg commented Sep 3, 2016

It would be cool to support beamer overlays, i.e. with code like the following (note the use of \only!), you can display a single line on a plot on one slide, and then display both on the second slide. Maybe a keyword argument like only="<2->" on the Plot object constructor would be good.

\begin{frame}{}
    \center
    \begin{tikzpicture}

\begin{axis}[title = {Behaviors Uniformly Distributed}, ymax = {1.5}, grid=both, ymin = {0}, xmax = {30}, xmin = {0}]\addplot+ coordinates {
(6.972, 1.33)
(7.089, 1.12)
(7.647, 0.896)
(9.6165, 0.566)
(15.369, 0.366)
(22.5885, 0.304)
};
\addlegendentry{Omnicience bound}
\only<2->{
\addplot+ coordinates {
(6.957, 1.388)
(7.194, 1.266)
(7.7895, 1.024)
(10.905, 0.72)
(17.5905, 0.468)
(26.76, 0.412)
};
\addlegendentry{Assume all normal}
}
\end{axis}

\end{tikzpicture}
\end{frame}
@mykelk
Copy link
Member

mykelk commented Sep 3, 2016

I think you can do this with something like:

Plots.Command("\\only<2->{")

and

Plots.Command("}")

Right? Then export the file without the preamble and input it into your document:

save("myfile.tex", p, include_preamble=false)

@zsunberg
Copy link
Contributor Author

zsunberg commented Sep 3, 2016

ah, yeah, that seems like it should work - didn't know about Command. Plots.Command("}") seems a little clumsy. Should we have a more robust mechanism for things like this eventually? or just leave it as-is?

@zsunberg
Copy link
Contributor Author

zsunberg commented Sep 3, 2016

Commands adds a ; in the wrong place

@mykelk
Copy link
Member

mykelk commented Sep 3, 2016

Hmm... How would you want this kind of thing to appear in a notebook? Maybe as an interact kind of thing with a slider bar? Do you think it's in the scope of this package?

@zsunberg
Copy link
Contributor Author

zsunberg commented Sep 3, 2016

My first thought is that it would be a feature that's only useful for beamer presentations, and in a notebook the option would have no effect. Given that this package's primary use is in preparing publications (and hence presentations) it might be useful to people. I guess don't really know what the scope of this project is, haha.

@mykelk
Copy link
Member

mykelk commented Sep 3, 2016

If one were to include this functionality, how would you like the interface to look?

@zsunberg
Copy link
Contributor Author

zsunberg commented Sep 6, 2016

I think I need to use the package more before I propose any solutions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants