-
-
Save gtgrthrst/1cd3cee11ca6434c4fe4b4bb603b839e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(sf) | |
library(ggplot2) | |
taiwan_shp <- st_read("C:\\Users\\gtgrt\\Downloads\\台灣鄉里界線\\TOWN_MOI_1091016.shp") #https://github.com/gtgrthrst/OpenData/blob/main/TOWN_MOI_1091016.shp | |
ggplot(taiwan_shp) + | |
geom_sf() | |
taiwan_shp %>% st_crop(xmin=118,xmax=123,ymin=20,ymax=26) %>% | |
ggplot() + | |
geom_sf(aes(colour = COUNTYNAME, fill = COUNTYNAME)) + | |
guides(fill = FALSE, color = FALSE, linetype = FALSE, shape = FALSE) #刪除圖例 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment