ggplot2 多图排版


和R自带的绘图系统不同,ggplot2不能直接通过par(mfrow) 或者 layout()来排版多张图片。终于发现,其实可以通过一个『gridExtra』包来搞定:

require(gridExtra)
plot1 <- Make_Smoking_Plot_TCGA("CLDN18", type = "Normal")
plot2 <- Make_Smoking_Plot_TCGA("CLDN18", type = "Tumor")
plot3 <- Make_Smoking_Plot_TCGA("CLDN18", type = "Tumor", exp_data = Expression_TvN_TCGA_Sel1)
plot4 <- Make_Smoking_Plot_TCGA("CLDN18", type = "Tumor", exp_data = Expression_TvN_TCGA_Sel2)
plot5 <- Make_Smoking_Plot_TCGA("CLDN18", type = "Tumor", exp_data = Expression_TvN_TCGA_Sel3)
plot6 <- Make_Smoking_Plot_TCGA("CLDN18", type = "Tumor", exp_data = Expression_TvN_TCGA_Sel4)
grid.arrange(plot1, plot2, plot3, plot4, plot5, plot6, ncol=2)

Reference:http://rstudio-pubs-static.s3.amazonaws.com/2852_379274d7c5734f979e106dcf019ec46c.html

优质内容筛选与推荐>>
1、dubbo+zookeeper
2、date——系统时间的命令
3、(转)使用 vs.php 调试PHP
4、android破解AndroidManifest.xml文件
5、PM项目管理流程


长按二维码向我转账

受苹果公司新规定影响,微信 iOS 版的赞赏功能被关闭,可通过二维码转账支持公众号。

    阅读
    好看
    已推荐到看一看
    你的朋友可以在“发现”-“看一看”看到你认为好看的文章。
    已取消,“好看”想法已同步删除
    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号