get_largest_polygon_list | R Documentation |
Largest polygon in a polygon list
get_largest_polygon_list(polygon_list, ...)
polygon_list |
|
... |
additional arguments are ignored. |
This function returns the largest polygon in a polygon list, intended when there are multiple polygons contained in one object.
If two polygons have identical area, the first polygon is returned.
Verify correct output when polygon(s) have holes.
list
with polygon coordinates "x"
and "y"
Other venndir polygons:
bbox_polygon_list()
,
eulerr_to_polygon_list()
,
get_venn_polygon_shapes()
,
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)
x <- eulerr::euler(counts)
polygon_list <- eulerr_to_polygon_list(x)
largest_poly <- get_largest_polygon_list(polygon_list)
plot_polygon_list(polygon_list, col=colorjam::rainbowJam(3, alpha=0.5))
plot_polygon_list(largest_poly, add=TRUE, border="red", lwd=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.