Description Usage Arguments Examples
See geom_voronoi
for general use.
Use geom="polygon"
for choropleth heatmap or geom="path"
for region borders.
1 2 3 
mapping 
Set of aesthetic mappings created by 
data 
The data to be displayed in this layer. There are three options: If A A 
geom 
The geometric object to use display the data 
position 
Position adjustment, either as a string, or the result of a call to a position adjustment function. 
na.rm 
If 
show.legend 
logical. Should this layer be included in the legends?

inherit.aes 
If 
outline 

... 
Other arguments passed on to 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  set.seed(45056)
x < sample(1:200,100)
y < sample(1:200,100)
points < data.frame(x, y,
distance = sqrt((x100)^2 + (y100)^2))
circle < data.frame(x = 100*(1+cos(seq(0, 2*pi, length.out = 2500))),
y = 100*(1+sin(seq(0, 2*pi, length.out = 2500))),
group = rep(1,2500))
ggplot(points) +
stat_voronoi(aes(x=x,y=y,fill=distance))
ggplot(points) +
stat_voronoi(aes(x=x,y=y),geom="path")
ggplot(points) +
stat_voronoi(aes(x=x,y=y,fill=distance),outline=circle)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.