This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Remove the venn diagram fill color

Hello,

I am wondering how I can remove the fill color inside the Venn diagram. I want it all to fill with white colour inside.

a<- ggVennDiagram(DEG_l_top[1:2])  + coord_flip()+
      ggtitle("Upregulated genes")+ theme(plot.title = element_text(hjust = 0.5, size=13))
a
a1 <- ggVennDiagram(DEG_l_top[5:6]) + coord_flip()+
      ggtitle("Downregulated genes")+ theme(plot.title = element_text(hjust = 0.5, size=13))

a2<- ggVennDiagram(DEG_l_top[4:3])+ coord_flip() +
  ggtitle("Upregulated genes")+ 
  theme(plot.title = element_text(hjust = 0.5, size=13))

a3<- ggVennDiagram(DEG_l_top[8:7])+ coord_flip()+
      ggtitle("Downregulated genes")+ theme(plot.title = element_text(hjust = 0.5, size=13))

Thanks in advance,

enter image description here

r ggplot2 venn

1 answer

Have you tried using the set_colour argument? Untested, but I took this from the readme.

ggVennDiagram(DEG_l_top[1:2], set_color = c("white","white"))  + coord_flip()+
      ggtitle("Upregulated genes")+ theme(plot.title = element_text(hjust = 0.5, size=13))

did not work. Instead, I have tried

+ggplot2::scale_fill_gradient(low = "white", high = "white") .

It does the job and fills all the venn with white color. Thanks for your help

Log in to answer this question.