R语言科研数据可视化配色方案备选

R语言科研数据可视化配色方案备选
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)
R语言科研数据可视化配色方案备选
R语言科研数据可视化配色方案备选
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)
R语言科研数据可视化配色方案备选
R语言科研数据可视化配色方案备选
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)
R语言科研数据可视化配色方案备选
R语言科研数据可视化配色方案备选

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)
R语言科研数据可视化配色方案备选
R语言科研数据可视化配色方案备选
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)
R语言科研数据可视化配色方案备选
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)
R语言科研数据可视化配色方案备选

    特别申明:本文为转载文章,转载自Punicagranatum 小明的数据分析笔记本,不代表贪吃的夜猫子立场,如若转载,请注明出处:https://mp.weixin.qq.com/s/Kt1wT5p9r2nxWEI0vWmwuw

    (0)
    打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
    xujunzju管理者
    上一篇 2023年5月28日 22:49
    下一篇 2023年5月30日 20:45

    相关推荐

    发表回复

    登录后才能评论
    联系我们
    邮箱:
    xujunzju@gmail.com
    公众号:
    xujunzju6174
    捐赠本站
    捐赠本站
    分享本页
    返回顶部