draw_venn: draw a venn plot

View source: R/1_plots.R

draw_vennR Documentation

draw a venn plot

Description

warning a venn plot for deg result created by three packages

Usage

draw_venn(
  x,
  main,
  color = c("#2874C5", "#f87669", "#e6b707", "#868686", "#66C2A5", "#FC8D62", "#8DA0CB",
    "#E78AC3", "#A6D854", "#FFD92F", "#E5C494", "#B3B3B3"),
  imagetype = "png",
  filename = NULL,
  lwd = 1,
  lty = 1,
  col = color[1:length(x)],
  fill = color[1:length(x)],
  cat.col = color[1:length(x)],
  cat.cex = 1,
  cat.dist = -0.15,
  rotation.degree = 0,
  main.cex = 1,
  cex = 1,
  alpha = 0.1,
  reverse = TRUE,
  ...
)

Arguments

x

a list for plot

main

Character giving the main title of the diagram

color

color vector

imagetype

Specification of the image format (e.g. tiff, png or svg)

filename

Filename for image output, or if NULL returns the grid object itself

lwd

width of the circle's circumference

lty

dash pattern of the circle's circumference

col

Colour of the circle's circumference

fill

Colour of the circle's area

cat.col

Colour of the category name

cat.cex

size of the category name

cat.dist

The distance (in npc units) of the category name from the edge of the circle (can be negative)

rotation.degree

Number of degrees to rotate the entire diagram

main.cex

Number giving the cex (font size) of the main title

cex

size of the area label

alpha

Alpha transparency of the circle's area

reverse

logical,reflect the three-set Venn diagram along its central vertical axis of symmetry. Use in combination with rotation to generate all possible set orders

...

other parameters from venn.diagram

Value

a venn plot according to x, y and.z named "name" paramter

Author(s)

Xiaojie Sun

See Also

draw_pca;draw_volcano;draw_heatmap

Examples

if(requireNamespace("VennDiagram",quietly = TRUE)&
  requireNamespace("ggplotify",quietly = TRUE)&
  requireNamespace("cowplot",quietly = TRUE)){
 x = list(Deseq2=sample(1:100,30),edgeR = sample(1:100,30),limma = sample(1:100,30))
 draw_venn(x,"test")
 draw_venn(x,"test",color = c("darkgreen", "darkblue", "#B2182B"))
}else{
 if(!requireNamespace("VennDiagram",quietly = TRUE)) {
   warning("Package 'VennDiagram' needed for this function to work.
   Please install it by install.packages('VennDiagram')")
 }
 if(!requireNamespace("ggplotify",quietly = TRUE)) {
   warning("Package 'ggplotify' needed for this function to work.
   Please install it by install.packages('ggplotify')")
 }
 if(!requireNamespace("cowplot",quietly = TRUE)) {
   warning("Package 'cowplot' needed for this function to work.
   Please install it by install.packages('cowplot')")
 }
}

tinyarray documentation built on June 22, 2024, 9:58 a.m.