Did some research...
library(ggplot2)
allStates <- map_data('state')
texas <- subset(allStates, region == 'texas')
head(texas)
# triangulate
n <- c(30.60688, 30.28370, 31.08425, 29.29955, 32.71078)
k <- c(-96.35286, -97.73405, -97.34860, -94.79447, -97.36118)
mat <- cbind(n, k)
df <- as.data.frame(mat)
names(df) <- c('x','y')
xrng <- expand_range(range(df$x), .05)
yrng <- expand_range(range(df$y), .05)
deldir_ds <- deldir(df, rw = c(xrng, yrng))$dirsgs
# voronoi
ggplot(texas, aes(x = long, y = lat)) +
geom_polygon(fill = 'grey25') +
geom_segment(data = deldir_ds,
aes(x = y1, y = x1, xend = y2, yend = x2),
size = .25, linetype = 2, color = rgb(229/255, 229/255, 229/255)) +
scale_x_continuous(expand = c(0,0)) +
scale_y_continuous(expand = c(0,0)) +
theme(panel.grid = element_blank())