get_venn_polygon_shapes | R Documentation |
Get Venn shapes as polygon_list
get_venn_polygon_shapes(
counts,
proportional = FALSE,
sep = "&",
circles_only = FALSE,
circle_nudge = NULL,
rotate_degrees = 0,
return_type = c("polygon_list", "JamPolygon"),
...
)
counts |
|
proportional |
|
sep |
|
circles_only |
|
circle_nudge |
|
rotate_degrees |
|
... |
additional arguments are ignored. |
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.
list
in polygon_list format with "x"
and "y"
elements,
or when return_type="JamPolygon"
it returns JamPolygon
.
Other venndir polygons:
bbox_polygon_list()
,
eulerr_to_polygon_list()
,
get_largest_polygon_list()
,
intersect_polygon_list()
,
labelr_polygon_list()
,
minus_polygon_list()
,
nudge_polygon_coords()
,
nudge_polygon_list()
,
plot_polygon_list()
,
polygon_areas()
,
polygon_circles()
,
polygon_ellipses()
,
polygon_list_labelr()
,
polygon_list_to_xy_list()
,
rescale_polygon_list()
,
simple_ellipse()
,
union_polygon_list()
,
xy_list_to_polygon_list()
counts <- c(A=1, B=2, `A&B`=3, C=4)
venn_colors <- colorjam::rainbowJam(3, alpha=0.5);
venn_polygon_list <- get_venn_polygon_shapes(counts)
plot_polygon_list(venn_polygon_list, col=venn_colors)
venn_polygon_list <- get_venn_polygon_shapes(counts, proportional=TRUE)
plot_polygon_list(venn_polygon_list, col=venn_colors)
# TODO: examples showing circle_nudge, rotate_degrees
jpdf <- get_venn_polygon_shapes(counts, return_type="JamPolygon")
counts4 <- c(A=1, B=2, `A&B`=3, C=4, `C&D`=2, D=3, `A&C`=2, `A&D`=1, `A&B&C&D`=3)
jpdf <- get_venn_polygon_shapes(counts4, return_type="JamPolygon")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.