Learn R Programming

g2r (version 0.1.0)

fig_voronoi: Voronoi

Description

Create a voronoi plot based on x and y aspects.

Usage

fig_voronoi(g2, ..., data = NULL, inherit_asp = TRUE, name = NULL)

Arguments

g2

An object of class g2r as returned by g2r.

...

Any option, aesthetic (asp), or animation (Animation).

data

A data.frame containing data to chart or a list.

inherit_asp

Whether to inherit aspects from g2r.

name

Name of figure, useful to apply functions to specific figures.

Examples

Run this code
# NOT RUN {
df <- dplyr::tibble(
  x = runif(25, 1, 500),
  y = runif(25, 1, 500),
  value = runif(25, 1, 500)
)

g2(df, asp(x, y, color = value)) %>% 
  fig_voronoi(axes = FALSE)

# }

Run the code above in your browser using DataLab