散点图加密度图

library(ggplot2)
library(tidyverse)
library(ggExtra)
data = read.table("mulvscon_ma.xls",header=T,row.names=1)
aes = aes(x=log2(baseMean),y=log2FoldChange)
maplot = ggplot(data=data,aes) + geom_point(aes(color=significance),size=0.5, show.legend = F)
p1 = maplot + scale_color_manual(values=c("#a92323","#999999","#a92323")) + geom_hline(yintercept=0,linetype=2,color="black")+geom_hline(yintercept=0.5,linetype=4,color="black")+ geom_hline(yintercept=-0.5,linetype=4,color="black")+theme_classic()
p2=ggMarginal(p1, type="density", fill="purple", color="purple")
p2
分类R

发表评论

邮箱地址不会被公开。 必填项已用*标注