美文网首页
KEGG 气泡图

KEGG 气泡图

作者: 余绕 | 来源:发表于2020-04-20 00:32 被阅读0次

    加载R包

    library(ggplot2)
    library(forcats)
    library(scales)
    

    加载数据

    circ=read.csv("Documents.csv")
    circ=as.data.frame(circ)
    circ$Term=fct_inorder(circ$Term) #fct_inorder按照事先排好的顺序进行。
    head(circ)
    

    画图

    ggplot(data=circ)+
      geom_point(mapping=aes(y=circ$Term,x=circ$Pvalue,size=circ$DEGsInPathway,color=circ$Pvalue))+
      scale_color_gradient2(low="red",mid="yellow",high='darkturquoise ',midpoint=0.015) +theme_bw()+theme(text=element_text(size=10,  family="sans"))
    
    #其中theme(text=element_text(size=10,  family="sans"))为修改坐标轴的字体以及大小
    

    查看ggplot2的默认字体

    theme_get()$text
    
    

    查看windows的默认字体

    windowsFonts()
    

    相关文章

      网友评论

          本文标题:KEGG 气泡图

          本文链接:https://www.haomeiwen.com/subject/xkqnbhtx.html