r语言多系列散点图(R可视化拓展)

在之前的推文中小编给大家展示过如何绘制散点图,今天,小编给大家展示的内容是对之前散点图的一部分拓展——将散点图中的散点换成俏皮可爱的图案。当然,这种图案虽然有趣,对于日常组会汇报可能有点用,但科研论文发表一定慎用,毕竟学术还是要以严谨为主。

基础散点图绘制

#加载R包 library(ggplot2) #绘图——数据以iris数据集为例 p1<-ggplot(iris,aes(Sepal.Length,Sepal.Width,color=Species)) geom_point() theme_bw() p1

r语言多系列散点图(R可视化拓展)(1)

geomlime包

1、安装并加载geomlime包

remotes::install_github("coolbutuseless/geomlime") library(geomlime)

2、绘图——基于geomlime包中的geom_lime()和geom_pint()函数:

p1 geom_lime(size = 4) theme(legend.position = 'none')

r语言多系列散点图(R可视化拓展)(2)

p1 geom_pint(size = 4) theme(legend.position = 'none')

r语言多系列散点图(R可视化拓展)(3)

emoGG包

1、安装并加载emoGG包

remotes::install_github("dill/emoGG") library(emoGG)

2、绘图——基于emoGG包中的geom_emoji()函数绘制

p1 geom_emoji(emoji = "1f938") theme(legend.position = 'none')

r语言多系列散点图(R可视化拓展)(4)

p1 geom_emoji(emoji = "1f48e") theme(legend.position = 'none')

r语言多系列散点图(R可视化拓展)(5)

p1 geom_emoji(emoji = "1f697") theme(legend.position = 'none')

r语言多系列散点图(R可视化拓展)(6)

ggbernie包

1、安装并加载ggbernie包

remotes::install_github("R-CoderDotCom/ggbernie") library(ggbernie)

2、绘图——基于ggbernie包中的geom_bernie()函数绘制

p1 geom_bernie(bernie = "sitting") theme(legend.position = 'none')

r语言多系列散点图(R可视化拓展)(7)

p1 geom_bernie(bernie = "stand") theme(legend.position = 'none')

r语言多系列散点图(R可视化拓展)(8)

p1 geom_bernie(bernie = "head") theme(legend.position = 'none')

r语言多系列散点图(R可视化拓展)(9)

p1 geom_bernie(bernie = "young") theme(legend.position = 'none')

r语言多系列散点图(R可视化拓展)(10)

p1 geom_bernie(bernie = "arms") theme(legend.position = 'none')

r语言多系列散点图(R可视化拓展)(11)

p1 geom_bernie(bernie = "eyebrows") theme(legend.position = 'none')

r语言多系列散点图(R可视化拓展)(12)

p1 geom_bernie(bernie = "asking") theme(legend.position = 'none')

r语言多系列散点图(R可视化拓展)(13)

ggcats包

1、安装并加载ggcats包

remotes::install_github("R-CoderDotCom/ggcats@main") library(ggcats)

2、绘图——基于ggcats包中的geom_cat()函数绘制

a<-ggplot(iris,aes(Sepal.Length,Sepal.Width)) geom_cat(cat = "shironeko", size = 2) theme_bw() b<-ggplot(iris,aes(Sepal.Length,Sepal.Width)) geom_cat(cat = "bongo", size = 2) theme_bw() c<-ggplot(iris,aes(Sepal.Length,Sepal.Width)) geom_cat(cat = "pop", size = 2) theme_bw() d<-ggplot(iris,aes(Sepal.Length,Sepal.Width)) geom_cat(cat = "toast", size = 2) theme_bw() cowplot::plot_grid(a,b,c,d,ncol = 2)

r语言多系列散点图(R可视化拓展)(14)

参考:

1)https://r-charts.com/miscellaneous/ggbernie/

2)https://r-charts.com/miscellaneous/geomlime/

3)https://r-charts.com/miscellaneous/ggcats/

,

免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。文章投诉邮箱:anhduc.ph@yahoo.com

    分享
    投诉
    首页