【发布时间】:2017-08-03 00:54:06
【问题描述】:
在 jupyter notebook 中使用 R,首先我设置了通用的绘图大小。其次,我想绘制一个不同大小的图。
## load ggplot2 library
library("ggplot2")
## set universal plot size:
options(repr.plot.width=6, repr.plot.height=4)
## plot figure. This figure will be 6 X 4
ggplot(iris, aes(x = Sepal.Length, y= Sepal.Width)) + geom_point()
## plot another figure. This figure I would like to be 10X8
ggplot(iris, aes(x = Sepal.Length, y= Sepal.Width)) + geom_point() + HOW DO i CHANGE THE SIZE?
如您所见,我想将第二个图(并且只有第二个图)更改为 10X8。我该怎么做?
对于一个可能很愚蠢的问题,我们深表歉意,因为在 Rstudio 中,绘图大小通常不是问题。
【问题讨论】: