I am working with Venn diagrams in R, ggplot2, and I would like to have the option to selectively color different parts, including the overlap between the two circles. I am limited to using ggplot2.
This is how far I have gotten. Here, I assign custom colors to the two circles, but have no control over the color of the overlap.
library(ggplot2)
df.venn <- data.frame(x = c(-0.5, 0.5),
y = c(0, 0),
labels = c("A", "B"),
stringsAsFactors = FALSE)
ggplot2::ggplot(data=df.venn) +
ggforce::geom_circle(
ggplot2::aes_string(x0 = "x", y0 = "y", r = 1.5, fill = "labels"),
alpha = 0.3,
size = 0.5,
colour = 'darkgray'
) +
ggplot2::coord_fixed() +
ggplot2::theme_void() +
ggplot2::scale_fill_manual(values = c("red", "blue"))
I would like to be able to selectively color also the overlapping region, allowing for instance the left and right circle parts to be gray, while the overlap is colored in a solid red. Is this possible?