0

我正在使用 R 包rgl来创建交互式绘图,然后使用它的功能rgl.snapshot来从中导出图像。但是,我想知道是否有办法将交互式rgl绘图中的快照直接插入普通 R 绘图的插图中。有没有人有这样的任务经验?

4

1 回答 1

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)
于 2015-05-13T08:39:57.363 回答