论文
MiDAS 4: A global catalogue of full-length 16S rRNA gene sequences and taxonomy for studies of bacterial communities in wastewater treatment plants
https://www.nature.com/articles/s41467-022-29438-7
数据链接
https://figshare.com/articles/dataset/Dueholm2021a_data_zip/16566408/1
代码链接
https://github.com/msdueholm/MiDAS4
今天的推文我们重复一下论文中的Figure1a 世界地图
image.png
之前的推文介绍过世界地图添加采样地点
首先是地图
我这里就不画国家的边界了,本来是想添加每个洲的边界的,但是暂时没有找到办法,想到了再来介绍吧
library(ggplot2)
world<-map_data("world")
ggplot() +
geom_polygon(data=world,aes(x=long,y=lat,group=group),
fill="#dedede")+
theme_bw()+
scale_y_continuous(expand = expansion(mult=c(0,0)))+
scale_x_continuous(expand = expansion(add=c(0,0))) -> world.map
world.map
image.png
添加采样点
df<-read.csv("figure1df.csv")
world.map+
geom_point(data = df,
aes(x=Longitude,
y=Latitude,
colour = Process_type2), size=2)+
scale_color_manual(values = c("#3373a5","#97b1c0",
"#f8ad63",
"#d8191a",
"#c4c4c4"))
image.png
添加文本标签
library(ggtext)
dftext<-data.frame(
x=c(-180,-150,-10,100,50,-50),
y=c(40,-50,-50,-50,50,60),
label=c("**North america**<br>3 countries<br>107 cities<br>145WWTPs",
"**South american**<br>2 countries<br>29 cities<br>38 WWTPs",
3,4,5,6)
)
world.map01 +
theme(legend.position = c(0.9,0.7),
legend.background = element_rect(fill="transparent"),
legend.box.background = element_rect(color="gray",
fill="transparent"),
legend.key = element_rect(fill="transparent"))+
geom_richtext(data=dftext,
aes(x=x,y=y,label=label),
nudge_x =0,hjust=0,
fill="transparent")