Creates a blank 2D venn, searches the intersections and then draws them with the desired shaded areas in a ggplot based venn. The two circles are A, B and C, respectively. ABC is the intersection, ABnoC is the intersection of A and B not overlapping with C, AnoBnoC is the area of A not overlapping with B or C, and so on. It is useful to inidcate that the data from a figure comes from an intersection.

shaded_3d_venn(
  highlight = c("ABC", "ABnoC", "AnoBC", "noABC", "AnoBnoC", "noABnoC", "noAnoBC"),
  color = c("red", "pink", "blue", "yellow", "green", "orange", "purple"),
  label = NULL,
  label.pos = "bottom.right",
  label.face = "italic",
  label.size = 13,
  label.col = "black",
  line.col = "black"
)

Arguments

highlight

Character of length 1 to 7. One of c("ABC", "ABnoC", "AnoBC", "noABC", "AnoBnoC", "noABnoC", "noAnoBC") or 'all'. If 'all', highlights all the areas. Default = c("ABC", "ABnoC", "AnoBC", "noABC", "AnoBnoC", "noABnoC", "noAnoBC").

color

Character of length 1 to 7. The same length as highlight. Colors of the highlighted areas. Default = c("red", "pink", "blue", "yellow", "green", "orange", "purple").

label

Character of length 1 or NULL. Label to draw next to the Venn. If NULL, does not write any label. Default = NULL.

label.pos

Character of length 1. One of c("bottom.right", "right.bottom", "bottom.left", "left.bottom", "top.right", "right.top", "top.left", "left.top"). Position of the label if 'label is not NULL. Default = 'bottom.right'

label.face

Character of length 1. Fontface of the label. Default = "italic"

label.size

Numeric of length 1. Size of the label. Default = 13

label.col

Character of length 1. Color of the label. Default = "black"

line.col

Character of length 1. Color of the line of the Venn. Default = "black"

Author

amitjavilaventura