get_venn_shapes: Get Venn shapes

get_venn_shapesR Documentation

Get Venn shapes

Description

Get Venn shapes

Usage

get_venn_shapes(
  counts,
  proportional = FALSE,
  sep = "&",
  circles_only = FALSE,
  circle_nudge = NULL,
  rotate_degrees = 0,
  ...
)

Arguments

counts

integer vector whose names represent set overlaps, where set names are separated by sep delimiter.

proportional

logical indicating whether to create proportional circles, where proportional=FALSE creates standard Venn diagram, and proportional=TRUE creates a Euler diagram.

sep

character delimiter used to separate set names in names(counts).

circles_only

logical indicating whether to force Venn 4-way diagram to use only circles; or passed to eulerr::euler() to force it to return circles instead of allowing ellipse shapes.

circle_nudge

list of numeric vectors each length 2, whose names match set names derived from counts. For example if counts=c(set_A=5, set_B=10, "setA&set_B"=3), then to nudge the set_A circle, use circle_nudge=list(set_A=c(1, 0)). This argument is intended to allow manipulation of specific circle or ellipse positions for aesthetic effects. Particularly for proportional Euler diagrams, sometimes the algorithm places circles in non-ideal locations

rotate_degrees

numeric value indicating rotation in degrees for the entire set of shapes. This argument is intended to change the overall orientation, for example so that certain sets are at the top.

...

additional arguments are ignored.

Details

This function takes a Venn overlap counts and creates corresponding circles or ellipses that represent either a Venn diagram, or proportional Venn (Euler) diagram.

For non-proportional Venn diagrams, this function accepts up to 5 sets, although the 5-way Venn diagram is not visually intuitive.

For proportional Euler diagrams, this function simply passes the count vector to eulerr::euler() and returns the output. That function accepts more sets, however not all overlaps may be represented in the output.

See Also

Other venndir utility: curate_venn_labels(), expand_range(), gridtext_make_outer_box(), gridtext_richtext_grob(), make_color_contrast(), make_venn_combn_df(), make_venn_test(), match_list(), nudge_venndir_label(), print_color_df(), shrink_df(), three_point_angle(), venndir_label_style(), venndir_legender(), venndir_to_df()


jmw86069/venndir documentation built on June 15, 2024, 1:52 p.m.