library(RColorBrewer)
color <- brewer.pal(3, "Set3")
# Chart
venn.diagram(
x = list(set1, set2, set3),
category.names = c("Set 1" , "Set 2 " , "Set 3"),
filename = 'venn2.png',
output=TRUE,
# 输出
imagetype="png" , # 类型(tiff png svg)
#height = 1000 , # 高度
#width = 1000 , # 宽度
resolution = 400, # 分辨率
compression = "lzw", # 压缩算法
# 圈
lwd = 5, # 圈线条粗细 1 2 3 4 5
lty = 1, # 线条类型, 1 实线, 2 虚线, blank 无线条
fill = color, # 填充色
col = c("red", 'green', 'blue'), # 线条色
# 数字 number
cex = 2, # 数字大小
fontface = "bold", # 加粗
fontfamily = "sans", # 字体
# 标签 category
cat.cex = 2, # 字体大小
cat.col = c("red", 'green', 'blue'), # 字体色
cat.fontface = "bold", # 加粗
cat.default.pos = "outer", # 位置, outer 内 text 外
cat.pos = c(-27, 27, 135), # 位置,用圆的度数
cat.dist = c(0.055, 0.055, 0.085), # 位置,离圆的距离
cat.fontfamily = "sans", # 字体
rotation = 1 # 1 2 3 旋转确定大打头数据集
)
R venn图
最新推荐文章于 2024-10-14 20:00:00 发布