基于R语言绘制Whittaker生物群系图

完整代码如下:

library(plotbiomes)

library(ggplot2)

library(readxl)

data<-read_excel("D:/Study/Data/site.xlsx")

cbbPalette <- c( "#AD443D","#68F261","#5FF2FA","#5E945D","#E077CB","#F7D063","#2F4487","#5A53E6","#7E9BBD")

p<-whittaker_base_plot() +

theme(panel.background = element_blank(),

panel.grid.minor = element_blank(),

legend.position = c(0.25, 0.75),legend.title = element_blank(),

panel.border = element_rect(fill = NA))+

geom_point(data = data,

aes(x = MAT,

y = MAP,colour=PFT),

size = 3,

shape = 19,

colour = "gray95",

fill = "black",

stroke = 0.5,

alpha = 0.7) +scale_color_manual(values=cbbPalette)+

theme(legend.justification = c(0, 1), # pick the upper left corner of the legend box and

legend.position = c(0, 1), # adjust the position of the corner as relative to axis

legend.background = element_rect(fill = NA), # transparent legend background

legend.box = "horizontal", # horizontal arrangement of multiple legends

legend.spacing.x = unit(0.5, units = "cm"))+

theme(axis.title.y=element_text(colour='black',size=16,face = "bold"),

axis.title.x=element_text(colour='black',size=16,face = "bold"),

axis.text.y=element_text(colour='black',size=14),

axis.text.x=element_text(colour='black',size=14,))

ggsave(file="D:/Study/Fig1_Whittaker Biome Classification.jpg",p,width =6,height = 6,dpi = 600)

相关推荐
安替-AnTi19 小时前
基于 React 和 TypeScript 搭建的机器学米其林餐厅数据分析项目
react.js·typescript·数据分析·毕设·米其林
秀儿还能再秀1 天前
基于Excel的数据分析思维与分析方法
数据分析·excel
好开心啊没烦恼1 天前
Python 数据分析:numpy,说人话,说说数组维度。听故事学知识点怎么这么容易?
开发语言·人工智能·python·数据挖掘·数据分析·numpy
涤生大数据2 天前
Apache Spark 4.0:将大数据分析提升到新的水平
数据分析·spark·apache·数据开发
可观测性用观测云2 天前
Pipeline 引用外部数据源最佳实践
数据分析
大数据CLUB2 天前
基于spark的奥运会奖牌变化数据分析
大数据·hadoop·数据分析·spark
好开心啊没烦恼2 天前
Python 数据分析:计算,分组统计1,df.groupby()。听故事学知识点怎么这么容易?
开发语言·python·数据挖掘·数据分析·pandas
数据饕餮2 天前
Python数据分析基础03:探索性数据分析
python·信息可视化·数据分析
用户Taobaoapi20143 天前
母婴用品社媒种草效果量化:淘宝详情API+私域转化追踪案例
大数据·数据挖掘·数据分析
key063 天前
电子水母函数解析
数据分析