zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    22:django 配置详解
    21:序列化django对象
    20:django中的安全问题
    19:django 分页
    HTML 标签(一)
    流程图学习绘制
    HTTP原理
    终端的颜色代码
    Python 进程 线程总结
    Python Select模型
  • 原文地址:https://www.cnblogs.com/foreverycc/p/6079795.html
Copyright © 2011-2022 走看看