目前,我正在尝试拉伸图表的x轴,以搜索季节性等内容。这意味着,我可能希望x轴比y轴长6倍左右,同时保持滴答和数据不变。举个例子:
x <- rnorm(20)^2 * 1000000
plot(x)

有没有办法让上面的x轴比y轴长很多?谢谢!
发布于 2014-10-07 16:08:06
下面的命令正在将其写入具有不同宽度的.png文件。文件fig1.png和fig2.png将保存到您的主目录中。
png("fig1.png", width = 400, height = 300)
x <- rnorm(20)^2 * 1000000
plot(x)
dev.off()
png("fig2.png", width = 600, height = 300)
x <- rnorm(20)^2 * 1000000 #or leave this out if you want the same data x
plot(x)
dev.off()https://stackoverflow.com/questions/26226224
复制相似问题