ggVennDiagram main parser
ggVennDiagram(
x,
category.names = names(x),
show_intersect = FALSE,
set_color = "black",
set_size = NA,
label = c("both", "count", "percent", "none"),
label_alpha = 0.5,
label_geom = c("label", "text"),
label_color = "black",
label_size = NA,
label_percent_digit = 0,
label_txtWidth = 40,
edge_lty = "solid",
edge_size = 1,
force_upset = FALSE,
nintersects = 20,
order.intersect.by = c("size", "name", "none"),
order.set.by = c("size", "name", "none"),
relative_height = 3,
relative_width = 0.3,
...
)
list of items
default is names(x)
if TRUE the text can be visualized by `plotly`
color of set labels ("black")
size of set labels (NA)
format of region labels, select one from c("count","percent","both","none")
set 0 to remove the background of region labels
layer of region labels, choose from c("label", "text")
color of region labels ("black")
size of region labels (NA)
number of digits when formatting percent label (0)
width of text used in showing intersect members, will be ignored unless show_intersection is TRUE (40)
line type of set edges ("solid")
line width of set edges (1)
if TRUE, will always produce Upset plot no matter how many sets have (FALSE)
number of intersects. If NULL, all intersections will show.
'size', 'name', or "none"
'size', 'name', or "none"
the relative height of top panel in upset plot
the relative width of left panel in upset plot
useless
A ggplot object
From version 1.4.4, `ggVennDiagram` will plot a upset plot when the number of sets is more than 7. Besides, user can switch to a upset plot with `upset_plot()` function. Please check the document of this function.
library(ggVennDiagram)
x = list(A=1:5,B=2:7,C=3:6,D=4:9)
ggVennDiagram(x) # 4d venn
ggVennDiagram(x[1:3]) # 3d venn
ggVennDiagram(x[1:2]) # 2d venn