基于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)

相关推荐
大数据CLUB6 小时前
基于spark的澳洲光伏发电站选址预测
大数据·hadoop·分布式·数据分析·spark·数据开发
智数研析社9 小时前
9120 部 TMDb 高分电影数据集 | 7 列全维度指标 (评分 / 热度 / 剧情)+API 权威源 | 电影趋势分析 / 推荐系统 / NLP 建模用
大数据·人工智能·python·深度学习·数据分析·数据集·数据清洗
qingyunliushuiyu10 小时前
BI数据可视化:驱动数据价值释放的关键引擎
数据挖掘·数据分析·数据分析系统·数据分析平台·bi数据可视化
折翼的恶魔12 小时前
数据分析:排序
python·数据分析·pandas
数据牧羊人的成长笔记17 小时前
数据分析需要掌握的数学知识(易理解)
数学建模·数据分析
折翼的恶魔18 小时前
数据分析:合并二
python·数据分析·pandas
kida_yuan1 天前
【从零开始】14. 数据评分与筛选
python·数据分析·nlp
寒月霜华2 天前
机器学习-探索性数据分析
数据挖掘·数据分析
StarPrayers.2 天前
PySpark基础知识(python)
python·数据分析·spark