plot3D-一次具有两个图 [英] plot3D - having two plots at once

查看:73
本文介绍了plot3D-一次具有两个图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

plot3d()生成一个3d图,我可以扭转和旋转.但是当我再次调用plot3d()时,上一个情节消失了,并被该情节取代了.

plot3d() produces a 3d plot that I can twist around and rotate. But when I call plot3d() again, the previous plot goes away and is replaced by this one.

如何做到这一点,以便打开一个新的XQuartz窗口,而不是将旧的窗口替换为新的3d图.

How can I make it so that a new XQuartz window opens up rather than the old window being replaced by the new 3d plot.

基本上,我希望一次打开两个3d图.

Essentially, I want two 3d plots opened at once.

推荐答案

像这样:

 library(rgl)

 open3d()
 x <- sort(rnorm(1000))
 y <- rnorm(1000)
 z <- rnorm(1000) + atan2(x,y)
 plot3d(x, y, z, col=rainbow(1000))

 open3d()
 x <- sort(rnorm(20))
 y <- rnorm(20)
 z <- rnorm(20) + atan2(x,y)
 plot3d(x, y, z, col=rainbow(20))

这里的关键是在第二个情节之前调用open3d来打开新的设备"

The key here is calling open3d before the second plot to open a new "device"

这篇关于plot3D-一次具有两个图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆