pythonic生物人

顶刊“复杂图”被它终结了!

今天再介绍一个R ggplot2强力扩展工具——ggalign ,能够简化复杂多图布局的构建过程,搞定顶刊“复杂图”。


ggalign快速使用

✅ 安装

install.packages("ggalign")

✅ 快速使用

library(ggalign)
set.seed(123)
ggheatmap(mat) +
    anno_right() +
    align_kmeans(3L) +
# Select and annotate rows 1–3 and 6–10 only
    ggmark(mark_line(1:3, 6:10)) +
    geom_boxplot(aes(.names, value)) +
    theme(plot.margin = margin(l = 0.1, t = 0.1, unit = "npc"))
Image如果自己撸代码,不得好几千行……

更多例子……,

Pan-cancer analysis of cell type distribution and abundance at single-cell resolution
Pan-cancer analysis of cell type distribution and abundance at single-cell resolution
Genomic density and Rainfall plot
Genomic density and Rainfall plot
Circlular plot
Circlular plot
Heatmap of gene expression matrix
Heatmap of gene expression matrix
更多案例 https://github.com/Yunuuuu/ggalign
更多案例 https://github.com/Yunuuuu/ggalign

ggalign功能Overview

✅ ggalign包含三大核心图形布局系统,

Image
  • CircleLayout(圆形布局系统),将绘图按圆形模式排列。
  • StackLayout(堆叠布局系统),将绘图水平或垂直堆叠排列。∙
  • QuadLayout(四象限布局系统),将绘图围绕中心图分为四个象限(上、左、下、右)排列。

每一类图形布局系统下又包含多种方法,

Image

✅ 当然,远不止这些,还有以下诸多辅助系统,这些系统与三大核心图形布局系统协同工作,增强数据感知的图形组合能力,

Image

本期结束!


强烈推荐《👉保姆级R可视化教程》,28个章节,11w字,数百张图,旨在引导如何系统学习R语言可视化,部分展示如下:
图片
图片
图片
图片
复现效果图-abcd图❤️
图片复现效果图-b图❤️
图片
❤️复现效果图-ABCD图❤️
图片
❤️复现效果图-bcd图❤️
图片
图片
❤️复现效果图-b图❤️
图片
图片
图片
图片
图片
图片
图片
图片
图片
图片

图片

图片
图片
图片

(加入学习,收费,备注:299)

图片