0
我有這樣的代碼,其產生本地圖:R:在geom_polygon ggmap移除額外線
library(ggmap)
library(mapdata)
counties <- map_data("county")
iowa_counties <- subset(counties, region=="iowa")
sq_map2 <- get_map(location = c(-92.55191,42.89219), maptype = "satellite", source = "google", zoom = 9)
ggmap(sq_map2) +
scale_y_continuous(limits=c(42.51118, 43.26184), expand=c(0,0)) +
scale_x_continuous(limits=c(-93.0735, -92.03318), expand=c(0,0)) +
geom_polygon(data = iowa_counties, aes(x=long, y=lat, group=group), fill = NA, color = "white")
正如你可以看到,有在頂部左側有一個額外的三角形。我怎樣才能擺脫它?
使用geom_map而不是geom_polygon –