I am using R package rgl
to create interactive plots and then its function rgl.snapshot
to export images from them. I am wondering, however, if there is a way how to insert snapshots from the interactive rgl
plot directly into insets of an ordinary R plot.
Does anybody have experience with such task?
Asked
Active
Viewed 189 times
0
1 Answers
0
library(png)
library(rgl)
example(surface3d)
rgl.snapshot("plot.png")
plot(0:10, 10:0)
img <- readPNG("plot.png")
rasterImage(as.raster(img), 4, 2, 8, 6)

Backlin
- 14,612
- 2
- 49
- 81