Description Usage Arguments Examples
Given a vector of 3 values, which describe 2-dimensional data, it plots a Venn diagram, i.e. 'crossing circles'. The user can specify values, labels for each circle-group and colors.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
x |
a numeric vector of length 3, where first value corresponds to only group 1, second is only group 2, and third is a crossover of the two groups. Can also be a character vector of length 3. |
labels |
a character vector of length 2, providing names for the 2 groups/dimensions. |
Colors |
a vector of color names for the backgrounds of each part of the diagram. |
Title |
optional: a character vector of length 1, specifying title for the whole plot. |
num.size |
sets the font size for the numbers inside the Venn diagram. |
shrink |
a numeric value, specifying zooming effect of the plot, defaults to 1. |
rot |
a numeric value, specifying the number of degrees to rotate the graph. |
radius |
a 2-item numeric vector containing the relative sizes of the two circles |
resizePlot |
a numeric value indicating the amount to increase or decrease the size of the plot |
reverseLabelOrdering |
boolean value indicating whether labels are in the normal or reverse ordering. default=TRUE for backward compatability with the original version |
printvals |
boolean value indicating whether to print the values of the groups. default=TRUE |
1 2 3 4 5 6 7 8 9 10 11 12 13 | plot.new()
plot_venn2d(rep("",3), radius=c(1.25,1.25), labels=c("Y","X"), Colors=c("yellow","orange","pink"))
grid.text(expression(paste(X,intersect(Y))),0.5,0.5)
grid.text("X",0.25,0.5)
grid.text("Y",0.75,0.5)
# rotated plot
y <- c(37,29,6)
labels <- c("A","B")
plot.new()
plot_venn2d(y, labels, Colors=rainbow(3),
Title = "This is an example of a 2D Venn plot",
radius=c(0.85, 1.0), rot=45)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.