I don't think tikz() can capture the plots in rgl. To export rgl
graphics, you need to use rgl.snapshot() or rgl.postscript().
Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA
On Wed, Feb 16, 2011 at 9:19 AM, cuass <fabianmauricio at hotmail.com>
wrote:>
> Hi guys.
> The tex file which compile the following graphic has many problems. I
don't
> know what's happening. Any input would be really appreciated.
>
> # Cargo el prgrama que produce el c?digo en Latex
> require(tikzDevice)
>
> # Establezco directorio del programa
> setwd('/Users/fabiangarcia/Documents/R')
>
> # El siguiente programa produce el archivo tex
> tikz('CobbGRAF.tex', standAlone = TRUE, width=5, height=5)
>
> # La gr?fica de la funci?n de utilidad
> f = function(x, y) ((y)^1*(x)^1)
> x = seq(0,5,len=40)
> y = seq(0,5,len=40)
> z = outer(x, y, f)
> ?showsurface = function(x, y, z)
> ?persp3d(x,y,z, col="blue", alpha=0.3, axes> ?F)+{
> ?contours = contourLines(x,y,z)
> ?for (i in 1:length(contours)) {
> ?with(contours[[i]], lines3d(x, y, level, col="darkred"))
> ?}
> ?}
> ?open3d()
> ?showsurface(x,y,z)
>
> ?# Cierro el device
> dev.off()
>
> # Compilo el archivo tex
> tools::texi2dvi('CobbGRAF.tex',pdf=F)
> --
> View this message in context:
r.789695.n4.nabble.com/tikzDevice-compiling-problem-tp3309028p3309028.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>