Dear Pavel, thank you for your interesting question and your positive feedback!
Concerning your application: the problem is caused by the fact that pgfplots processes its \addplot data twice: once during a survey phase and once during the actual visualization. In your example, the layers are added during survey phase (where no output is generated).
To add them during the visualization phase, you need to use one of the various hooks in which you can enter custom TeX commands.
Unfortunately, I have just realized that the required hook is missing (sorry about that). I have just added it to the git repository, and I added your example to the manual (with your permission, I assume).
Please watch the pgfplots sourceforge homepage for new unstable TDS releases (or checkout the git repositories from sourceforge) to get the new code.
Attached is the resulting .tex and .pdf (note that I experimented with it to get a minimal example -- the attached one does not use beamer, and it does not require the remember picture option. This, however, is no restriction at all -- it was just for my tests).
Best regards Christian PSI am currently verifying that my changes work as intended. The changes will be in the online git repository this evening, I think. The unstable TDS may need more time, watch out on http://pgfplots.sourceforge.net/ .
Am 26.02.2011 17:36, schrieb Pavel Striz:
Good evening, Mr. Feuersänger, Thank you for pgfplots and pgfplotstable packages. Those are very useful!Still, any ideas how to get ocg package to work? I am enclosing a minimal example, where three layers are created but not working. This example is based on http://www.texample.net/weblog/2008/nov/02/creating-pdf-layers/ via TikZ.Anyway, if you would be interested to publish an article/a paper about your tools in the Zpravodaj journal of the Czech TeXists, http://bulletin.cstug.cz/, we would be honored to do so.Pavel Striz
%! pdflatex \documentclass{article} \pagestyle{empty} \usepackage[pdftex]{ocg} \usepackage{pgfplots} \pgfplotsset{width=9cm,compat=1.3} \begin{document} \begin{tikzpicture} \begin{axis}[samples=20, domain=0:1, y domain=0:1, xlabel=$x_1$, ylabel=$x_2$, zlabel=$v$, view={110}{35}] %%shader=flat, surf, \addplot3+[ execute at begin plot visualization=\begin{ocg}{prvni}{prvni}{0}, execute at end plot visualization=\end{ocg}, ] coordinates {(0,0,12) (0,1,2) (1,0,6) (0,0,12)}; \addplot3+[ execute at begin plot visualization=\begin{ocg}{druhy}{druhy}{0}, execute at end plot visualization=\end{ocg}, ] coordinates {(0,0,9) (0,1,8) (1,0,4) (0,0,9)}; \addplot3+[ execute at begin plot visualization=\begin{ocg}{treti}{treti}{0}, execute at end plot visualization=\end{ocg}, ] coordinates {(0,0,1) (0,1,7) (1,0,3) (0,0,1)}; \end{axis} \end{tikzpicture} \end{document}
pokus2.pdf
Description: Adobe PDF document
------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________ Pgfplots-features mailing list Pgfplots-features@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pgfplots-features