当在幻灯片内部时,数据不会被呈现。
有什么提示或解决方法吗?
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary {datavisualization.formats.functions}
\begin{document}
\begin{frame}[fragile]
\frametitle{Foo}
\onslide<1->{
No data displayed:
\tikz \datavisualization
[scientific axes=clean,
visualize as scatter/.list={a,b,c},
style sheet=cross marks]
data [format=named] {
x=0, y={1,2,3}, set=a
x={2,3,4}, y={3,4,5,7}, set=b
x=6, y={5,7,...,15}, set=c
};
}
Data displayed:
\tikz \datavisualization
[scientific axes=clean,
visualize as scatter/.list={a,b,c},
style sheet=cross marks]
data [format=named] {
x=0, y={1,2,3}, set=a
x={2,3,4}, y={3,4,5,7}, set=b
x=6, y={5,7,...,15}, set=c
};
\end{frame}
\end{document}
答案1
uncoverenv
您可以通过使用和onlyenv
类似的环境来避免该问题:
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary {datavisualization.formats.functions}
\begin{document}
\begin{frame}[fragile]
\frametitle{Foo}
\begin{uncoverenv}<1->
No data displayed:
\tikz \datavisualization
[scientific axes=clean,
visualize as scatter/.list={a,b,c},
style sheet=cross marks]
data [format=named] {
x=0, y={1,2,3}, set=a
x={2,3,4}, y={3,4,5,7}, set=b
x=6, y={5,7,...,15}, set=c
};
\end{uncoverenv}
Data displayed:
\tikz \datavisualization
[scientific axes=clean,
visualize as scatter/.list={a,b,c},
style sheet=cross marks]
data [format=named] {
x=0, y={1,2,3}, set=a
x={2,3,4}, y={3,4,5,7}, set=b
x=6, y={5,7,...,15}, set=c
};
\end{frame}
\end{document}