我想创建一个单一的PDF文件,并用包把几个地块在它ggplot2
。 不过,我需要减少的一个特定情节的宽度,在所有。 下面是代码:
invisible(pdf("foo.pdf"))
foo <- data.frame(x=rnorm(100), y=rnorm(100), class=factor(sample(2,1000,T)))
ggplot(foo, aes(x=x,y=y))+geom_point() # first plot
# For next plot I want to reduce the width
ggplot(foo, aes(x=class,y=y)) + geom_boxplot()
invisible(dev.off())
怎么做?