运行我的代码时,我的地图会被X剪切。我无法发布数据,但我可以发布代码。我试图在ggmap上使用Voronoi图,并在其上使用点。地图看起来不错,但是一半是voronoi,一半是地图。
sbbox <- make_bbox(lon = c( -98.70445,-98.31298), lat = c(29.35194,29.6695))
sq_map <- get_map(location = sbbox, maptype = "terrain", source = "google")
ggmap(sq_map) +
geom_polygon(fill = 'grey') +
geom_segment(data = deldir_ds,
aes(x = y1, y = x1, xend = y2, yend = x2),
size = .50, linetype = 2, color = rgb(229/255, 229/255, 229/255)) +
geom_point(data=newstores,
aes(x = newstores$LON_L, y = newstores$LAT_L)) +
geom_point(data=newsa45,
aes(x = newsa45$LON_K, y = newsa45$LAT_K, colour = "red")) +
scale_x_continuous(expand = c(0, 0)) +
scale_y_continuous(expand = c(0, 0)) +
theme(panel.grid = element_blank())