`rm(list = ls())
library(sf)
library(ggplot2)
library(cowplot)
library(lemon)
library(gm)
nanhai <- sf::st_read("D:\\All_shp_file\\中国南海84坐标\\中国南海84坐标.shp", crs = 4326)
taiwan <- sf::st_read("D:\\All_shp_file\\中国南海84坐标\\台湾(面图).shp", crs = 4326)
river_basin <- sf::st_read("D:\\All_shp_file\\River_basin_shp\\China_Basin1.shp")
world_map <- read_sf("D:\\All_shp_file\\world_country\\世界国家.shp", crs = 4326)
Yangtze <- river_basin[river_basin$NAME == '长江流域', ]
river_shp <- read_sf("D:\\All_shp_file\\2023湖泊河流\\水系线.shp")
river_shp_1 <- river_shp[river_shp$Class == 1, ]
river_shp_1 <- st_transform(river_shp_1, crs = 4326)
p_mainland <- ggplot() +
#geom_sf(data = Yangtze,fill="NA",size=0.5,color="#ef767a") +
geom_sf(data = world_map,size=.5,color="black",fill = 'black') +
geom_sf(data = river_shp_1, fill='black',size=15,color="#87CEEB") +
geom_sf(data = taiwan, fill = NA) +
geom_sf(data = nanhai, fill = NA) +
coord_sf(xlim = c(75,135), ylim = c(15,55)) +
scale_x_continuous(breaks = c(seq(from = 80, to = 120, by = 20))) +
scale_y_continuous(breaks = c(seq(from = 10, to = 50, by = 10)))+
#geom_line(data = dd_110, aes(x = lat, y = lon), size = 1, color = 'black')+
theme_linedraw()+
theme_bw()+theme(panel.grid=element_blank())+
theme(text = element_text(family = 'Times_New_Roman',size = 25,face = "bold"),
panel.background = element_rect(fill = NA),
panel.border = element_rect(fill = NA, color = "black", size = 2,linetype = "solid"),
#panel.grid.major = element_line(colour = "grey50"),
#axis.line = element_line(size = 0.7, colour = "black"),
panel.ontop = FALSE,panel.grid.minor = element_blank()
)`
上述使用的shp文件数据存放在百度网盘中:
链接:https://pan.baidu.com/s/1qHFZuGzVDQUxi5dY82Iwww?pwd=1avv
提取码:1avv