Unlimited learning, half price | 50% off
Get 50% off unlimited learning

ggpattern (version 0.2.0)

create_polygon_df: Create a polygon_df object from the given coordinates

Description

code using polygon_df should not assume that the first and last point within each id are the same. i.e. they may have to manulaly set a final point equal to the initial point if that is what their graphics system desires

Usage

create_polygon_df(x, y, id = 1L)

Arguments

x, y

coordinates of polygon. not necessarily closed.

id

a numeric vector used to separate locations in x,y into multiple polygons

Value

data.frame with x, y, id columns.