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

相关推荐
終不似少年遊*1 天前
【数据可视化】Pyecharts-家乡地图
python·信息可视化·数据挖掘·数据分析·数据可视化·pyecharts
仟濹2 天前
「Matplotlib 入门指南」 Python 数据可视化分析【数据分析全栈攻略:爬虫+处理+可视化+报告】
python·信息可视化·数据分析·matplotlib
刘天远2 天前
深度解析企业风控API技术实践:构建全方位企业风险画像系统
大数据·数据库·数据分析
勇太的数分之旅2 天前
Excel大厂自动化报表实战(互联网金融-数据分析周报制作下)
信息可视化·金融·数据分析·自动化·excel·数据可视化
Mikhail_G2 天前
Python应用八股文
大数据·运维·开发语言·python·数据分析
大数据魔法师2 天前
豆瓣图书数据采集与可视化分析(四)- 豆瓣图书数据可视化(Pyecharts)
python·数据分析·数据可视化
Python当打之年2 天前
【61 Pandas+Pyecharts | 基于Apriori算法及帕累托算法的超市销售数据分析可视化】
python·信息可视化·数据分析·pandas·数据可视化
lilye662 天前
精益数据分析(102/126):SaaS用户流失率优化与OfficeDrop的转型启示
数据挖掘·数据分析
lilye662 天前
精益数据分析(103/126):免费移动应用的下载量、成本优化与案例解析
数据挖掘·数据分析
Python当打之年3 天前
【59 Pandas+Pyecharts | 淘宝华为手机商品数据分析可视化】
华为·智能手机·数据分析·pandas·数据可视化