1.for 与 png()
- 对富集到的结果用goplot展示,又想把BP、CC、MF分开进行绘制;于是用for循环进行,但每次的图都是空白;需要在png的下一行代码,用print()把绘图过程打印出来才有图;
for (i in 1:length(data)){
png(filename =paste0(data[i],'.png') ,width = 1800,height = 1000,res = 80)
print(GOChord(chord, space = 0.1, gene.order = 'logFC', gene.space = 0.3, gene.size = 7,process.label = 20)+
ggtitle(data[i])+
theme(plot.title = element_text(size=25,hjust = 0.5)))
dev.off()
}