R for statistics

R IN ACTION SELF-TUTORIAL-68 用gg

2021-03-14  本文已影响0人  RashidinAbdu
install.packages('ggvenn') # 安装

library(ggvenn)#导入
a<-c(2,1,5,8,9)
b<-c(2,3,4,5,6)

# 重点来了,生成list:
vd<-list('a'=a,'b'=b)
ggvenn(vd)
gp<-ggvenn(vd,fill_color = c("red","green"))+labs(title = "ggvenn Rashidin")
gp

image.png

library(ggplot2)
p2<-ggplot(mtcars)+geom_abline()+labs(title = "Line of  Rashidin")
p2
image.png
library(patchwork)
gp+p2

得到:


image.png
上一篇下一篇

猜你喜欢

热点阅读