R-可视化-韦恩图venn
示例数据 3个基因集列表,为list格式 1 2 3 4 5 genes <- paste0("gene",1:1000) set.seed(20210302) gene_list <- list(A = sample(genes,100), B = sample(genes,200), C = sample(genes,300)) 一、VennDiagram VennDiagram包是绘制韦恩图...
示例数据 3个基因集列表,为list格式 1 2 3 4 5 genes <- paste0("gene",1:1000) set.seed(20210302) gene_list <- list(A = sample(genes,100), B = sample(genes,200), C = sample(genes,300)) 一、VennDiagram VennDiagram包是绘制韦恩图...
一、ggplot绘制基础箱图 0、示例数据 1 2 3 4 5 6 7 8 9 10 11 12 13 library(ggplot2) library(patchwork) #组别名最好是字符型;如果是数值类型,最好转为因子化 ToothGrowth$dose = factor(ToothGrowth$dose) summary(ToothGrowth) # len supp dose #...
1、示例数据 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 library(ggplot2) library(patchwork) library(carData) #示例数据 head(Salaries) #教职工资情况 # rank discipline yrs.since.phd yrs.service sex salary # 1 Prof B 19 18 Male 139750 # 2 Prof B 20 16 Male 173200 # 3 AsstProf B 4 3 Male 79750 #...
1、R中颜色的表示方式 1.1 颜色的名字 R内置了657种颜色的名字可供调用 http://www.stat.columbia.edu/~tzheng/files/Rcolor.pdf 1 2 3 4 5 6 7 8 9 10 11 str(colors()) # chr [1:657] "white" "aliceblue" "antiquewhite" ... head(colors()[1:10]) # [1] "white" "aliceblue" "antiquewhite" # [4] "antiquewhite1" "antiquewhite2" "antiquewhite3" set.seed(111) cols = sample(colors(), 5)...
简单整理两个绘制热图R包的用法,分别是基础的pheatmap包与复杂的ComplexHeatmap包。 pheatmap 1 2 3 4 5 # install.packages("pheatmap") library(pheatmap) packageVersion("pheatmap") # [1] ‘1.0.12...
弦图常用于表示两组或多组成员之间的连接关系。如下简单学习circlize包ChordDiagram()绘制弦图的基础用法 参考教程:https...
桑基图(sankey plot)是一种特定类型的流图,用于描述一组值到另一组值的流向;理论上来表示前一组值与后一组值存在一定的逻辑关系。从泛化...
1、pie() pie()是基础的绘制饼图函数,用法简单 1 2 3 4 5 6 7 8 pie(Prop, labels = LETTERS[1:5], main = "Test Piechart") # labels:设置标签 # radius:设置半径,de...
1、ggplot geom_text()通过交代文本的坐标位置与内容绘制,通常与点图联用。相关参数包括: color 标签的颜色 alpha 标签的透明度 check_overlap 若有重叠的...
1 2 3 4 5 6 # install.packages("corrplot") library(corrplot) # 计算相关性矩阵 M<-cor(mtcars) dim(M) # [1] 11 11 1、可视化R系数方式 method参数提供了如下6种可视化方式 circle(default), square, ellipse, number, shade, color, pie 1 corrplot(M, method="ellipse") 2、对称布局方...