Learn R Programming

ggVennDiagram (version 0.5.0)

ggVennDiagram: ggVennDiagram

Description

ggVennDiagram

Usage

ggVennDiagram(
  x,
  category.names = names(x),
  show_intersect = FALSE,
  n.sides = 3000,
  label = "both",
  label_alpha = 0.5,
  label_geom = geom_label,
  lty = 1,
  color = "grey",
  ...
)

Arguments

x

list of items

category.names

default is names(x)

show_intersect

whether add a hidden text to polygons in the plot, the text can be further visualized by `plotly::ggplotly()`

n.sides

set how many points been generated for one ellipse, the more points, the better resolution.

label

select one from c("count","percent","both")

label_alpha

set 0 to remove label background

label_geom

choose from geom_label and geom_text

lty

line type of polygons

color

line color of polygons

...

Other arguments passed on to the polygon layer.

Value

A ggplot object

Examples

Run this code
# NOT RUN {
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
# }

Run the code above in your browser using DataLab