geometry_pointificate: Convert complex geometries in to points, paths and polygons.

Description Usage Arguments Examples

Description

Convert complex geometries in to points, paths and polygons.

Usage

1

Arguments

geom

A geometry data frame.

...

Additional arguments passed on to methods.

  • geometry_polygon: use close = TRUE to "close" the polygon by putting the first point at the end.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
x <- seq(0, 4 * pi, length = 100)
df <- data.frame(x = x, y = sin(x))
rib <- render_ribbon(df, ~x, ~y - 1, ~ y + 1)
rib %>% plot()
rib %>% geometry_pointificate() %>% plot()
rib %>% geometry_pointificate() %>% geometry_flip() %>% plot()

df <- expand.grid(x = 1:3, y = 1:3)
df$z <- runif(9, pi, 2 * pi)
arc <- df %>% render_arc(~x, ~y, 0, 0.35, 0, ~z)
arc %>% plot()
arc %>% geometry_pointificate() %>% plot()

histogram_ex %>% plot()
histogram_ex %>% geometry_pointificate() %>%	plot()

nz %>% plot()
nz %>% geometry_pointificate(close = TRUE) %>% plot()

rstudio/gggeom documentation built on May 28, 2019, 4:35 a.m.