Skip to content
Prev 157143 / 398506 Next

Changing a plot

R Help wrote:
OK, I see the issue but I don't at the moment see a way around it.
  The only R graphics device I know of that actually maintains the full
scene in the way that you want is rgl:


library(rgl)
rgl.bg(color="white")
rgl.points(runif(10000),runif(10000),0,col="black")
rgl.viewpoint(theta=0,phi=0,fov=1)
for (i in 5:995) {
  ##  rgl.points(i/1000,i/1000,0,col="green",alpha=0.5,size=20)
  rgl.spheres(i/1000,i/1000,0,col="green",alpha=1,radius=0.02)
  rgl.pop()
}

  This is kind of an ugly workaround, but maybe it will work for you.
(Really, the fundamental problem is that the plot is ALWAYS being
redrawn -- I think the issue is that rgl just redraws it much faster ...)

   I'm curious if anyone else has solutions.

  Ben Bolker