维恩图

使用VennDiagram包

安装

> install.packages("VennDiagram")
> library(VennDiagram)

官方使用文档

  • label.col标签颜色

  • scaled = TRUE是否按照数据量显示园大小

  • main="dsad"标题

  • sub = "Featuring:子标题

  • fill = c("cornflowerblue", "yellow"),填充色

  • cat.fontface = "bold",分类标签字体是否加粗

  • cat.col = c("dodgerblue"),分类字体颜色

  • cat.pos = c(30, 27),分类字体所在位置

  • cat.dist分类标签与圆边缘的距离

  • cat.cex分类标签字体大小

  • cat.just标签对齐方式

  • col = "transparent",圆圈线条透明

  • cex可以指定圆圈内每个标签的大小

  • label.col指定圆圈内每个标签颜色

venn.diagram(
  x = list(
    "A2 vs At conserve " = as.vector(data1[, 1]),
    "D5 vs Dt conserve" = as.vector(data2[, 1])
  ),
  filename = "veenES.png",
  hyper.test = TRUE,
  height = 1000,
  width = 1000,
  scaled = TRUE,
  main = "340 conserve ES events",
  imagetype = "png",
  main.cex = 0.75,
  main.just = c(1, 1),
  main.pos = c(0.35, 1),
  col = "transparent",
  fill = c("#f53b57", "#0fbcf9"),
  alpha = 0.50,
  label.col = c("#2d3436"),
  cat.fontface = "bold",
  cat.col = c("#f53b57", "#0fbcf9"),
  cat.cex = c(0.5),
  cat.pos = -1,
  cat.dist = c(0.03, -0.43),
)

在线网址: http://jvenn.toulouse.inra.fr/app/example.html

Last updated