Multiple Venn diagrams one plot using R ggarrange - unwanted formatting changes

21 Views Asked by At

I want to create one plot containing 4 Venn diagrams. Each with proportional circles and a heading. Blue and red in each plot need to stay in the same position for each Venn for consistency - ideally red in the left circle. However, when I use the code below, the red and blue switch around. Does anyone know how to override this using ggarrage, or if there is another package that can achieve similar? Many thanks and best wishes, Clare

# create pairwise Venn diagram
addisons <- draw.pairwise.venn(area1=1075, area2=1371,cross.area=757,
               fill=c("#CC6677", "#4477AA"))

alcohol <- draw.pairwise.venn(area1=81830, area2=37252,cross.area=22472,
                        fill=c("#CC6677", "#4477AA"))

anaemia <- draw.pairwise.venn(area1=30040, area2=12833,cross.area=3338,
                        fill=c("#CC6677", "#4477AA"))

aneurysm <- draw.pairwise.venn(area1=2550, area2=5048,cross.area=1455,
                        fill=c("#CC6677", "#4477AA"))

anxiety <- draw.pairwise.venn(area1=92622, area2=18254,cross.area=4852,
                        cfill=c("#CC6677", "#4477AA"))

# install ggpubr package
install.packages("ggpubr")
library(ggpubr)

# create plot with multiple venns
ggarrange(addisons, alcohol, anaemia, aneurysm,
      labels = c("Addison's disease", "Alcohol & substance", "Anaemia", "Aneurysm"),
      ncol = 2, nrow = 2, font.label=list(size=9))

Tried to create one plot but the colours switch from left to right

0

There are 0 best solutions below