箱线图 boxplot,一行两列图
library(ggpubr)
p1 <- ggboxplot(cvs, x="group", y="cv", color = "group",
palette = "jco", add = "jitter")+ #添加p-valuep
stat_compare_means()
p2 <- ggboxplot(cvs, x="group", y="sbpcv", color = "group",
palette = "jco", add = "jitter")+ #添加p-valuep
stat_compare_means()
box <- cowplot::plot_grid(plotlist = list(p1,p2),labels = "AUTO")
box
ggsave(plot = box,
filename = "box.jpg",
width = 18,height = 9,units = "cm")
相关分析图
library(ggstatsplot)
a <- ggscatterstats(data = cvs %>% select(cv,sbpcv) ,
x = "cv",
y = "sbpcv"
)
ggsave(plot = a,
filename = "pcv_sbpdv.jpg",
width = 15,height = 9,units = "cm")
网友评论