ggplot绘图之一页多图

可以用Rmisc包中的multiplot函数

multiplot(…,plotlist=NULL, cols=1,layout=NULL)

plotlist: a list of ggplot objescts

cols: Number of columns in layout

layout: A matrix specifying the layout. If present, 'cols' is ignored

If the layout is something like matrix(c(1,2,3,3), nrow=2, byrow=TRUE), then plot 1 will go in the upper left, 2 will go in the upper right, and 3 will go all the way across the bottom

注意,一般默认是按列填充,如设定图片类型为两行,则先填充第一列,再填充第二列,以此类推。

例:multiplot(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,cols=5)

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值