This very simple plot is stucking when dragging, rotating, etc. It's not slow, but the extend is changing making it really difficult to follow the data. It's because of the axis labels which are repositioned during the interaction. But why is this also if I set axis = FALSE? It's still jumping around... Any ideas?
library(rgl)
# has glitches during rotation, etc.
xyz = rbind(
c(696640.9, 211180.6, 1125.691),
c(696640.9, 211180.5, 1125.696),
c(696640.9, 211180.1, 1125.725),
c(696641.1, 211179.8, 1125.813)
)
plot3d(xyz, type="p", size=10)
# runs smoothly
xyz = rbind(
c(6, 2, 1),
c(9, 5, 6),
c(4, 1, 5),
c(1, 8, 3)
)
plot3d(xyz, type="p", size=10)
How can I fix this 'bug'? Thanks alot.
Also, due to the jumping, the positioning of the data itself seem to be corrupted. For example, the green line is touching the red line datawise. But that's not consistant for all viewing angles.
EDIT
The suggested answer using scale()
is fixing the issue for plot3d()
but is not solving the issue for me. I'm adding more data to the plot with points3d()
, segments3d()
and abcline3d()
which are then not well placed. Even if I use scale()
also on the data added by these functions.