ggvenn2: A modified version of functions from the ggvenn package for...

View source: R/ggvenn2.R

ggvenn2R Documentation

A modified version of functions from the ggvenn package for plotting phylogenetic venn diagrams.

Description

A modified version of functions from the ggvenn package for plotting phylogenetic venn diagrams.

Usage

ggvenn2(
  data,
  columns = NULL,
  show_elements = FALSE,
  show_percentage = TRUE,
  digits = 1,
  fill_color = c("blue", "yellow", "green", "red"),
  fill_alpha = 0.5,
  stroke_color = "black",
  stroke_alpha = 1,
  stroke_size = 1,
  stroke_linetype = "solid",
  set_name_color = "black",
  set_name_size = 6,
  text_color = "black",
  text_size = 4,
  label_sep = ",",
  count_column = NULL,
  show_outside = c("auto", "none", "always"),
  auto_scale = FALSE,
  comma_sep = FALSE
)

Arguments

data

A data.frame or a list as input data.

columns

A character vector use as index to select columns/elements.

show_elements

Show set elements instead of count/percentage.

show_percentage

Show percentage for each set.

digits

The desired number of digits after the decimal point

fill_color

Filling colors in circles.

fill_alpha

Transparency for filling circles.

stroke_color

Stroke color for drawing circles.

stroke_alpha

Transparency for drawing circles.

stroke_size

Stroke size for drawing circles.

stroke_linetype

Line type for drawing circles.

set_name_color

Text color for set names.

set_name_size

Text size for set names.

text_color

Text color for intersect contents.

text_size

Text size for intersect contents.

label_sep

Separator character for displaying elements.

count_column

Specify column for element repeat count.

show_outside

Show outside elements (not belongs to any set).

auto_scale

Allow automatically resizing circles according to element counts.

comma_sep

Whether to use comma as separator for displaying numbers.

Value

The ggplot object to print or save to file.

References

Yan, Linlin, and Maintainer Linlin Yan. "Package “ggvenn.”." (2021).

See Also

geom_venn, ggvenn

Examples


# use list as input
a <- list(`Set 1` = c(1, 3, 5, 7),
          `Set 2` = c(1, 5, 9),
          `Set 3` = c(1, 2, 8),
          `Set 4` = c(6, 7))
ggvenn2(a, c("Set 1", "Set 2"))
ggvenn2(a, c("Set 1", "Set 2", "Set 3"))
ggvenn2(a)


holobiont documentation built on Oct. 17, 2024, 1:07 a.m.

Related to ggvenn2 in holobiont...