find_venn_overlaps_JamPolygon | R Documentation |
Find Venn polygon overlaps
find_venn_overlaps_JamPolygon(
jp,
venn_counts = NULL,
venn_items = NULL,
venn_colors = NULL,
sep = "&",
preset = "dichromat2",
blend_preset = "ryb",
do_plot = FALSE,
verbose = FALSE,
...
)
jp |
|
venn_counts |
|
venn_items |
|
sep |
|
preset , blend_preset |
|
do_plot |
|
verbose |
|
... |
additional arguments are passed to supporting functions
|
This function takes a named list of polygons and returns the combination of polygon overlaps as used in a Venn diagram.
When a vector of Venn counts is supplied, the
counts are associated with the respective polygon,
and any counts not represented by a polygon
are returned as an attribute "venn_missing"
.
JamPolygon
object, which contains columns:
"name"
"x"
, "y"
"fill"
"venn_name"
"venn_count"
"venn_items"
"venn_color"
"label"
"label_x"
"label_y"
Other JamPolygon:
JamPolygon-class
,
Venndir-class
,
[,JamPolygon,ANY,ANY,ANY-method
,
add_orientation_JamPolygon()
,
area_JamPolygon()
,
bbox_JamPolygon()
,
buffer_JamPolygon()
,
check_JamPolygon()
,
check_Venndir()
,
eulerr_to_JamPolygon()
,
farthest_point_JamPolygon()
,
has_point_in_JamPolygon()
,
intersect_JamPolygon()
,
label_fill_JamPolygon()
,
label_outside_JamPolygon()
,
label_segment_JamPolygon()
,
labelr_JamPolygon()
,
minus_JamPolygon()
,
nearest_point_JamPolygon()
,
nudge_JamPolygon()
,
plot.JamPolygon()
,
point_in_JamPolygon()
,
polyclip_to_JamPolygon()
,
polygon_circles()
,
polygon_ellipses()
,
sample_JamPolygon()
,
split_JamPolygon()
,
union_JamPolygon()
,
update_JamPolygon()
# simple Venn circles
test_counts <- c(A=5, B=10, C=3, `B&C`=2)
x <- eulerr::euler(test_counts)
jp1 <- eulerr_to_JamPolygon(x)
polygon_colors <- colorjam::rainbowJam(length(jp1))
jp1@polygons$fill <- polygon_colors;
plot(jp1)
xo <- find_venn_overlaps_JamPolygon(jp=jp1, venn_counts=test_counts)
xo@polygons$outerborder <- jamba::makeColorDarker(darkFactor=1.2,
xo@polygons$venn_color)
xo@polygons$outerborder.lwd <- 4;
plot(xo);
testlist <- list(set_A=LETTERS, set_B=LETTERS[1:10], set_C=LETTERS[7:11])
so <- subset(signed_overlaps(testlist), count > 0)
test_counts <- setNames(so$count, so$sets)
x <- eulerr::euler(test_counts)
jp1 <- eulerr_to_JamPolygon(x)
jp1@polygons$fill <- polygon_colors;
plot(jp1)
xo <- find_venn_overlaps_JamPolygon(jp=jp1, venn_counts=test_counts, verbose=TRUE)
xo@polygons$outerborder <- jamba::makeColorDarker(darkFactor=1.2,
xo@polygons$venn_color)
xo@polygons$outerborder.lwd <- 4;
plot(xo);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.