w28924461701 / cdc20b

0 stars 0 forks source link

bach-boxplot.r #2

Open w28924461701 opened 1 year ago

w28924461701 commented 1 year ago

library(dplyr) library(ggpubr) library(ggplot2)

for(i in tcga_gtex_withNormal$tissue){

tedata<-filter(tcga_gtex_withNormal,tissue==i)

绘制配对差异分析的图形

p=ggplot(tedata, aes(x =type2,y =tpm, fill =type2))+ ylab('CDC20B expression(TPM)')+ geom_boxplot() p=p +scale_fill_manual(values=c("#E69F00", "#56B4E9"))+ theme_classic()+ theme(legend.position="top")+ theme(axis.text=element_text(size=14), axis.title.x=element_text(size=16),axis.title.y=element_text(size=14))+ stat_compare_means()

pdf(file=paste0("b.",i,".pdf"),onefile = FALSE, width = 6, #图片的宽度 height =5) #图片的高度 print(p) dev.off() }