在Jupyter笔记本中使用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中通常不会出现绘图大小的问题。
library(repr)
这部分对我来说是不必要的。 - eddi