创建特定大小的绘图窗口 [英] Creating a Plot Window of a Particular Size
本文介绍了创建特定大小的绘图窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何创建具有特定宽度和高度(以像素等为单位)的新的屏幕上R绘图窗口?
How can I create a new on-screen R plot window with a particular width and height (in pixels, etc.)?
推荐答案
使用dev.new()
. (请参阅此相关问题.)
plot(1:10)
dev.new(width=5, height=4)
plot(1:20)
更具体地说明使用哪些单位:
To be more specific which units are used:
dev.new(width=5, height=4, unit="in")
plot(1:20)
dev.new(width = 550, height = 330, unit = "px")
plot(1:15)
编辑为Rstudio提供的其他论点(2020年5月),(感谢用户Soren Havelund Welling )
edit additional argument for Rstudio (May 2020), (thanks user Soren Havelund Welling)
对于Rstudio,添加dev.new(width=5,height=4,noRStudioGD = TRUE)
For Rstudio, add dev.new(width=5,height=4,noRStudioGD = TRUE)
这篇关于创建特定大小的绘图窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文