开发者

How to get two windows with different plots

开发者 https://www.devze.com 2023-03-25 14:37 出处:网络
When we have a window 开发者_如何转开发with plots, is there a way to tell R to display a new plot in a new window?plot(1:1)

When we have a window 开发者_如何转开发with plots, is there a way to tell R to display a new plot in a new window?


plot(1:1)
dev.new()
plot(2,2)
dev.set(dev.prev()) # go back to first
title(main="test dev 1")

dev.set(dev.next()) # go to second
title(main="test dev 2")


Create a new one:

plot(1:10)
x11()            # This has aliases on different OSes
plot(10:1)


You might actually want to partition the window instead so you can have mutuple plots in the same window if you are comparing them:

The following will create 3 horizontal partitions:

par(mfrow = c(3,1))

So with 3 plots it will look like the following in a single Window:

How to get two windows with different plots

0

上一篇:

:下一篇

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号