draw.triple.venn(area1, area2, area3, n12, n23, n13, n123, category =
rep("", 3), rotation = 1, reverse = FALSE, euler.d =
TRUE, scaled = TRUE, lwd = rep(2, 3), lty =
rep("solid", 3), col = rep("black", 3), fill = NULL,
alpha = rep(0.5, 3), label.col = rep("black", 7), cex
= rep(1, 7), fontface = rep("plain", 7), fontfamily =
rep("serif", 7), cat.pos = c(-40, 40, 180), cat.dist =
c(0.05, 0.05, 0.025), cat.col = rep("black", 3),
cat.cex = rep(1, 3), cat.fontface = rep("plain", 3),
cat.fontfamily = rep("serif", 3), cat.just =
list(c(0.5, 1), c(0.5, 1), c(0.5, 0)), cat.default.pos
= "outer", cat.prompts = FALSE, rotation.degree = 0,
rotation.centre = c(0.5, 0.5), ind = TRUE, sep.dist =
0.05, offset = 0, cex.prop = NULL, print.mode = "raw",
sigdigs = 3, direct.area = FALSE, area.vector = 0,
...)
margin
, which indicates amount of whitespace around the final diagram in npc unitseuler.d == TRUE
. Certain Euler diagrams make use of the scaled
, sep.dist
, or offset
arguments specific to two-set Venn diagrams where appropriate.
The function defaults to placing the three circles in a triangular arrangement with two sets on top and one set below. The circles correspond to area1, area2 and area3 in a clockwise fashion with area1 on the top left.
N.B. General scaling for three-set Venn diagrams are disabled due to potentially misleading visual representation of the data. To re-enable, assign any value to variable overrideTriple
.# A simple three-set diagram
venn.plot <- draw.triple.venn(65, 75, 85,
35, 15, 25, 5, c("First", "Second", "Third"));
grid.draw(venn.plot);
grid.newpage();
# A more complicated diagram
venn.plot <- draw.triple.venn(
area1 = 65,
area2 = 75,
area3 = 85,
n12 = 35,
n23 = 15,
n13 = 25,
n123 = 5,
category = c("First", "Second", "Third"),
fill = c("blue", "red", "green"),
lty = "blank",
cex = 2,
cat.cex = 2,
cat.col = c("blue", "red", "green")
);
grid.draw(venn.plot);
grid.newpage();
# Demonstrating an Euler diagram
venn.plot <- draw.triple.venn(20, 40, 60, 0, 0, 0, 0,
c("First", "Second", "Third"), sep.dist = 0.1, rotation.degree = 30);
# Writing to file
tiff(filename = "Triple_Venn_diagram.tiff", compression = "lzw");
grid.draw(venn.plot);
dev.off();
Run the code above in your browser using DataLab