View source: R/bezier_coords.R
bezier_to_polygon | R Documentation |
Transform bezier dataframe to dataframe with path coordinates
bezier_to_polygon(df_benjamini_leaf, ..., n = 100)
df_benjamini_leaf |
Dataframe returned by |
... |
grouping variables in |
n |
number of points per bezier |
Dataframe with the coordinates of the bezier curve interpolations.
df_coords <- benjamini_leaf() %>%
tidyr::unite(b, i_part, element, remove = FALSE) %>%
bezier_to_polygon(b, i_part, element)
df_coords
df_coords %>%
ggplot2::ggplot(ggplot2::aes(x = x, y = y, group = element, fill = element)) +
ggplot2::geom_polygon()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.