I am trying to create a 3-D graph (using scatter3d) and save the graph to a 
file so I can insert the graph into a manuscript. I am able to create the 
graph. When I run the code below an RGL window opens that has the graph. The 
file is saved to disk after dev.odd() runs. Unfortunately, when I open the 
saved file, all I see is a white window. Can someone tell me how to have the 
file so I can subsequently read and place the file in a paper? The problem 
occurs regardless of the format in which I try to save the file, e.g. png, tiff.


x <- 1:10
y <- 2:11
z <- y+rnorm(10)
ForGraph<-data.frame(x=x,y=y,z=z)
ForGraph

gpathj <- file.path("C:","LAL","test.jpeg")
gpathj
jpeg(file = gpathj)
par(mai = c(0.5, 0.5, 0.5, 0.5))
scatter3d(z=ForGraph$x,
          y=ForGraph$y,
          x=ForGraph$z,
          surface=FALSE,grid=TRUE,sphere.size=4
          ,xlab="Categories",ylab="ScoreRange",
          zlab="VTE Rate (%)",axis.ticks=TRUE)
dev.off()


Thank you,
John


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to