r - 为什么绘图窗口的大小在 R 中保持不变?
问题描述
目前存在两个问题:
问题1: 感谢@Humpelstielzchen,这个问题已经解决,这是因为“noRStudioGD = TRUE”问题。
我查看了这篇文章,并尝试了 Shane 的答案,即:
# the plot with width=5
dev.new(width=5, height=4)
plot(1:20)
然后我尝试将宽度从 5 更改为 10,看看是否有一些不同:
# the plot with width=10
dev.new(width=10, height=4)
plot(1:20)
问题 2:
我更改了units =
(厘米或英寸),但似乎没有变化。更奇怪的是,这两个窗户的宽度是23.2厘米,高度是10.5厘米:这些窗户的宽度既不是10厘米也不是10英寸,高度也不是4厘米或4英寸。
# units = "cm"
dev.new(width=10, height=4, noRStudioGD = TRUE, units = "cm")
plot(1:20, main = "units = cm")
# units = "inch"
dev.new(width=10, height=4, noRStudioGD = TRUE, units = "inch")
plot(1:20, main = "units = inch")
解决方案
你所要做的
dev.new(width=10, height=4, noRStudioGD = TRUE, units = "cm")
plot(1:20)
他们显然改变了dev.new()
前一段时间在 RStudio 中的行为。
描述中也有一些关于它的内容:? dev.new
推荐阅读
- json - 流分析解析 json,相同的 key 可以是数组,也可以不是
- python - 使用 Turtle 用 Python 编写交互式游戏:Hopper
- python-3.x - 如果我使用嵌入层,如何解码我的 seq-to-seq 模型的输出?
- c# - PayPalAPIInterfaceServiceService 和 SetExpressCheckout 配置/凭证信息
- google-apps-script - OAuth 同意屏幕不包含应用的客户端 ID
- javascript - 如何引用动态创建的表单字段
- heroku - 如何使用带有 golang 的自定义构建脚本并做出反应?
- java - 在带有字符串数组的 if else 语句中打印出多行。(爪哇)
- java - Firebase 实时数据库,一次查询加载多个用户
- php - 使用具有绝对位置的 div 中的图像滑动轮播