看到朋友圈有人转发了一个视频
image.png
然后找到这个up主的主页来看了下,其中有四个视频是国潮顶级配色,还有一个视频是世界经典配色,个人觉得还挺好看的,保存下来作为R语言科研数据可视化中的配色备选方案,这里只保存视频封面的配色,视频里还提供了很多两两搭配的配色,这个有点多,有时间了再抽空整理
世界经典配色
image.png
library(ggplot2)
cols01<-c("#f49128","#194a55","#187c65","#f26115","#c29f62","#83ba9e")
ggplot(data = data.frame(y=letters[1:6],
x=10),
aes(x=x,y=y))+
geom_col(aes(fill=y),show.legend = FALSE)+
scale_fill_manual(values = cols01)+
geom_text(aes(label=cols01,x=5),color="white",size=8)
image.png
国潮顶级配色之一
image.png
cols02<-c("#c62d17","#023f75","#ea894e","#266b69","#eb4601","#f6c619")
ggplot(data = data.frame(y=letters[1:6],
x=10),
aes(x=x,y=y))+
geom_col(aes(fill=y),show.legend = FALSE)+
scale_fill_manual(values = cols02)+
geom_text(aes(label=cols02,x=5),color="white",size=8)
image.png
这里两个红稍微有点重复
国潮顶级配色之二
image.png
cols03<-c("#fa6e01","#2f2f2f","#972b1d","#e6a84b","#4c211b","#ff717f")
ggplot(data = data.frame(y=letters[1:6],
x=10),
aes(x=x,y=y))+
geom_col(aes(fill=y),show.legend = FALSE)+
scale_fill_manual(values = cols03)+
geom_text(aes(label=cols03,x=5),color="white",size=8)
image.png
国潮顶级配色之三
image.png
cols04<-c("#223e9c","#b12b23","#aebea6","#edae11","#0f6657","#c74732")
ggplot(data = data.frame(y=letters[1:6],
x=10),
aes(x=x,y=y))+
geom_col(aes(fill=y),show.legend = FALSE)+
scale_fill_manual(values = cols04)+
geom_text(aes(label=cols04,x=5),color="white",size=8)
image.png
国潮顶级配色之四
image.png
cols05<-c("#6a73cf","#edd064","#0eb0c8","#f2ccac","#a1d5b9","#e1abbc")
ggplot(data = data.frame(y=letters[1:6],
x=10),
aes(x=x,y=y))+
geom_col(aes(fill=y),show.legend = FALSE)+
scale_fill_manual(values = cols05)+
geom_text(aes(label=cols05,x=5),color="white",size=8)
image.png
拼图
library(ggplot2)
cols01<-c("#f49128","#194a55","#187c65","#f26115","#c29f62","#83ba9e")
ggplot(data = data.frame(y=letters[1:6],
x=10),
aes(x=x,y=y))+
geom_col(aes(fill=y),show.legend = FALSE)+
scale_fill_manual(values = cols01)+
geom_text(aes(label=cols01,x=5),color="white",size=8) -> p1
cols02<-c("#c62d17","#023f75","#ea894e","#266b69","#eb4601","#f6c619")
ggplot(data = data.frame(y=letters[1:6],
x=10),
aes(x=x,y=y))+
geom_col(aes(fill=y),show.legend = FALSE)+
scale_fill_manual(values = cols02)+
geom_text(aes(label=cols02,x=5),color="white",size=8) -> p2
cols03<-c("#fa6e01","#2f2f2f","#972b1d","#e6a84b","#4c211b","#ff717f")
ggplot(data = data.frame(y=letters[1:6],
x=10),
aes(x=x,y=y))+
geom_col(aes(fill=y),show.legend = FALSE)+
scale_fill_manual(values = cols03)+
geom_text(aes(label=cols03,x=5),color="white",size=8) -> p3
cols04<-c("#223e9c","#b12b23","#aebea6","#edae11","#0f6657","#c74732")
ggplot(data = data.frame(y=letters[1:6],
x=10),
aes(x=x,y=y))+
geom_col(aes(fill=y),show.legend = FALSE)+
scale_fill_manual(values = cols04)+
geom_text(aes(label=cols04,x=5),color="white",size=8) -> p4
cols05<-c("#6a73cf","#edd064","#0eb0c8","#f2ccac","#a1d5b9","#e1abbc")
ggplot(data = data.frame(y=letters[1:6],
x=10),
aes(x=x,y=y))+
geom_col(aes(fill=y),show.legend = FALSE)+
scale_fill_manual(values = cols05)+
geom_text(aes(label=cols05,x=5),color="white",size=8) -> p5
library(patchwork)
p1+theme_void()+
p2+theme_void()+
p3+theme_void()+
p4+theme_void()+
p5+theme_void()+
plot_layout(nrow = 1)
image.png
欢迎大家关注我的公众号
小明的数据分析笔记本
小明的数据分析笔记本 公众号 主要分享:1、R语言和python做数据分析和数据可视化的简单小例子;2、园艺植物相关转录组学、基因组学、群体遗传学文献阅读笔记;3、生物信息学入门学习资料及自己的学习笔记!