R绘制相关的热力系数图和不同调色板的气泡图和椭圆图

临风暖阳 发表于 2022/11/26 21:00:38 2022/11/26
【摘要】 笔者用R语言绘制相关的热力系数图和不同调色板的气泡图和椭圆图

library(ggplot2)  
library(RColorBrewer)  
library(reshape2) 

#------------------------------------------(d) 椭圆图-------------------------------------------------------
library(corrplot)
library(matlab)

color<-colorRampPalette(c(brewer.pal(7,"Set1")[2],"white",brewer.pal(7,"Set1")[1]))(100)

corrplot(mat, method="ellipse",order ="alphabet",pch.col = "black",col=color)

#------------------------------------------ (e)气泡标签图-------------------------------------------------------
corrplot.mixed(mat,order ="alphabet",pch.col = "black",bg = "grey80", lower.col = color, upper.col = color)

#------------------------------------------(d) 椭圆图-------------------------------------------------------
library(corrplot)
library(matlab)

color<-colorRampPalette(c(brewer.pal(7,"Set2")[2],"white",brewer.pal(7,"Set2")[1]))(100)

corrplot(mat, method="ellipse",order ="alphabet",pch.col = "black",col=color)

#------------------------------------------ (e)气泡标签图-------------------------------------------------------
corrplot.mixed(mat,order ="alphabet",pch.col = "black",bg = "grey80", lower.col = color, upper.col = color)

#------------------------------------------(d) 椭圆图-------------------------------------------------------
library(corrplot)
library(matlab)

color<-colorRampPalette(c(brewer.pal(7,"Set3")[2],"white",brewer.pal(7,"Set3")[1]))(100)

corrplot(mat, method="ellipse",order ="alphabet",pch.col = "black",col=color)

#------------------------------------------ (e)气泡标签图-------------------------------------------------------
corrplot.mixed(mat,order ="alphabet",pch.col = "black",bg = "grey80", lower.col = color, upper.col = color)

#------------------------------------------(d) 椭圆图-------------------------------------------------------

color<-colorRampPalette(c(brewer.pal(7,"Pastel1")[2],"white",brewer.pal(7,"Pastel1")[1]))(100)

#------------------------------------------(d) 椭圆图-------------------------------------------------------
library(corrplot)
library(matlab)

color<-colorRampPalette(c(brewer.pal(7,"Paired")[2],"white",brewer.pal(7,"Paired")[1]))(100)

corrplot(mat, method="ellipse",order ="alphabet",pch.col = "black",col=color)

#------------------------------------------ (e)气泡标签图-------------------------------------------------------
corrplot.mixed(mat,order ="alphabet",pch.col = "black",bg = "grey80", lower.col = color, upper.col = color)


#------------------------------------------(d) 椭圆图-------------------------------------------------------
library(corrplot)
library(matlab)

color<-colorRampPalette(c(brewer.pal(7,"Dark2")[2],"white",brewer.pal(7,"Dark2")[1]))(100)

corrplot(mat, method="ellipse",order ="alphabet",pch.col = "black",col=color)

#------------------------------------------ (e)气泡标签图-------------------------------------------------------
corrplot.mixed(mat,order ="alphabet",pch.col = "black",bg = "grey80", lower.col = color, upper.col = color)

#------------------------------------------(d) 椭圆图-------------------------------------------------------
library(corrplot)
library(matlab)

color<-colorRampPalette(c(brewer.pal(7,"Accent")[2],"white",brewer.pal(7,"Accent")[1]))(100)

corrplot(mat, method="ellipse",order ="alphabet",pch.col = "black",col=color)

#------------------------------------------ (e)气泡标签图-------------------------------------------------------
corrplot.mixed(mat,order ="alphabet",pch.col = "black",bg = "grey80", lower.col = color, upper.col = color)

#------------------------------------------(d) 椭圆图-------------------------------------------------------
library(corrplot)
library(matlab)

color<-colorRampPalette(c(brewer.pal(7,"Spectral")[2],"white",brewer.pal(7,"Spectral")[1]))(100)

corrplot(mat, method="ellipse",order ="alphabet",pch.col = "black",col=color)

#------------------------------------------ (e)气泡标签图-------------------------------------------------------
corrplot.mixed(mat,order ="alphabet",pch.col = "black",bg = "grey80", lower.col = color, upper.col = color)

#------------------------------------------(d) 椭圆图-------------------------------------------------------
library(corrplot)
library(matlab)

color<-colorRampPalette(c(brewer.pal(7,"BrBG")[2],"white",brewer.pal(7,"BrBG")[1]))(100)

corrplot(mat, method="ellipse",order ="alphabet",pch.col = "black",col=color)

#------------------------------------------ (e)气泡标签图-------------------------------------------------------
corrplot.mixed(mat,order ="alphabet",pch.col = "black",bg = "grey80", lower.col = color, upper.col = color)

#------------------------------------------(d) 椭圆图-------------------------------------------------------
library(corrplot)
library(matlab)

color<-colorRampPalette(c(brewer.pal(7,"PiYG")[2],"white",brewer.pal(7,"PiYG")[1]))(100)

corrplot(mat, method="ellipse",order ="alphabet",pch.col = "black",col=color)

#------------------------------------------ (e)气泡标签图-------------------------------------------------------
corrplot.mixed(mat,order ="alphabet",pch.col = "black",bg = "grey80", lower.col = color, upper.col = color)

#------------------------------------------(d) 椭圆图-------------------------------------------------------
library(corrplot)
library(matlab)

color<-colorRampPalette(c(brewer.pal(7,"PRGn")[2],"white",brewer.pal(7,"PRGn")[1]))(100)

corrplot(mat, method="ellipse",order ="alphabet",pch.col = "black",col=color)

#------------------------------------------ (e)气泡标签图-------------------------------------------------------
corrplot.mixed(mat,order ="alphabet",pch.col = "black",bg = "grey80", lower.col = color, upper.col = color)

#------------------------------------------(d) 椭圆图-------------------------------------------------------
library(corrplot)
library(matlab)

color<-colorRampPalette(c(brewer.pal(7,"PuOr")[2],"white",brewer.pal(7,"PuOr")[1]))(100)

corrplot(mat, method="ellipse",order ="alphabet",pch.col = "black",col=color)

#------------------------------------------(d) 椭圆图-------------------------------------------------------
library(corrplot)
library(matlab)

color<-colorRampPalette(c(brewer.pal(7,"Set1")[2],"white",brewer.pal(7,"Set1")[1]))(100)

corrplot(mat, method="ellipse",order ="alphabet",pch.col = "black",col=color)

#------------------------------------------(d) 椭圆图-------------------------------------------------------
library(corrplot)
library(matlab)

color<-colorRampPalette(c(brewer.pal(7,"Set2")[2],"white",brewer.pal(7,"Set2")[1]))(100)

corrplot(mat, method="ellipse",order ="alphabet",pch.col = "black",col=color)

#------------------------------------------(d) 椭圆图-------------------------------------------------------
library(corrplot)
library(matlab)

color<-colorRampPalette(c(brewer.pal(7,"Set3")[2],"white",brewer.pal(7,"Set3")[1]))(100)

corrplot(mat, method="ellipse",order ="alphabet",pch.col = "black",col=color)

#------------------------------------------(d) 椭圆图-------------------------------------------------------
library(corrplot)
library(matlab)

color<-colorRampPalette(c(brewer.pal(7,"Pastel1")[2],"white",brewer.pal(7,"Pastel1")[1]))(100)

corrplot(mat, method="ellipse",order ="alphabet",pch.col = "black",col=color)

#------------------------------------------(d) 椭圆图-------------------------------------------------------
library(corrplot)
library(matlab)

color<-colorRampPalette(c(brewer.pal(7,"Pastel2")[2],"white",brewer.pal(7,"Pastel2")[1]))(100)

corrplot(mat, method="ellipse",order ="alphabet",pch.col = "black",col=color)

#------------------------------------------(d) 椭圆图-------------------------------------------------------
library(corrplot)
library(matlab)

color<-colorRampPalette(c(brewer.pal(7,"Paired")[2],"white",brewer.pal(7,"Paired")[1]))(100)

corrplot(mat, method="ellipse",order ="alphabet",pch.col = "black",col=color)

【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区),文章链接,文章作者等基本信息,否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件至:cloudbbs@huaweicloud.com进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容。
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。