Description Usage Arguments Value Note Examples
This function takes three-variable values and their overlapped values and fit to a Venn chart. (The value of where three variables overlap may not fit exactly.)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | vennchart(A_all, B_all, C_all,
AandB, AandC, BandC)
vennChart(A_all , B_all , C_all ,
AandB , AandC , BandC,
plot = TRUE,
colors = list(rgb(0,0,1,0.3), rgb(1,0, 0, 0.3), rgb(0, 1, 0, 0.3)),
frameadj = 1.5, line = NA, lwd = 2,
texts = TRUE, names = c("A", "B", "C"),
Value = TRUE, cex = 1, textadj = c(0.5, 0.5),
connect = "\n", unit = " ", digits = 3)
plotVenn(V,
color = list(rgb(0,0,1,0.3), rgb(1,0, 0, 0.3), rgb(0, 1, 0, 0.3)),
line = NA,lwd = 2, frameadj = 1.5)
plotVennTexts(P, Atext = "A", Btext = "B", Ctext = "C",
ABtext = " ", ACtext = " ", BCtext = " ",
Value = TRUE, cex = 1, connect = "\n", unit = " ")
|
A_all, B_all, C_all |
Values of variable A, B and C. The area of circles corresponds to these values. |
AandB, AandC, BandC |
Value of intersections between two variables. The values correspond to the ovelaping circle area. Note that the overlaping area of three variables are not considered in rendering the plot. |
plot |
Whether to make the plot (default: TRUE) |
colors |
List of 3 color arguments, each item correspond to one variable, and will be passed to the polygon{graphics} function. |
frameadj |
The size of the frame realtive to the minimal suqure to fit the graph.(Default : 1.5) |
lim |
A list of two arrays, passing to function |
line |
Eadge lines to the circles, the argyment will be passed to the |
lwd |
Eadge line width of the circles, the argyment will be passed to the |
texts |
Whether to print texts on the plot. Default is TRUE. |
names |
An array of strings, names given to the three circles (variables). |
value |
whether to add variable values ( |
cex |
Relative text size, will be passed to the |
textadj |
An array of 2 numerics.The locations of text (variables and overlapped area), as distance from a center in the unit of the radius. Default is |
connect |
A string. Attached between the variable names and values if values are printed. Default is |
unit |
A string. Attached to the end of the variable value if values are printed. Default is |
V |
The item |
P |
The item |
Atext, Btext, Ctext |
Strings, the names of vairiables. (As the elements in the |
ABtext, ACtext, BCtext |
Strings of the overlaping area. |
circles |
A list of centers ( |
textpos |
Alist of calculated text positions. |
Set the output format to be square so the circles look right. In .Rmd notebooks, use fig.width = s, fig.height = s
to make the output figure square.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | # the vairiable values
co_A <- 10
co_B <- 12
co_C <- 3
co_AB <- 1.9 # where AB overlapped
co_BC <- 0.5
co_AC <-1
# make the plot with default
vennChart(A_all = co_A, B_all = co_B, C_all = co_C,
AandB = co_AB, AandC = co_AC, BandC = co_BC)
# alter some things, and save the outputs in a new variable
Q <- vennChart(A_all = co_A, B_all = co_B, C_all = co_C,
AandB = co_AB, AandC = co_AC, BandC = co_BC,
colors = list(rgb(0.145, 0.51, 0.71, 0.4),
rgb(1, 0.78, 0.16, 0.4),
rgb(1, 0.32, 0.16, 0.4)),
textadj = c(1, 0.2),
cex = 1.5,
frameadj = 1.1
)
# change plot color
# put the text of the three variables on the edge (\code{textadj[1] = 1}.)
# larger text font
# relatively smaller frame
# plot and print text from the output of \code{vennChart}
plotVenn(Q$circles, frameadj = 1.2)
plotVennTexts(Q$textspos, unit = "%)", connect = ":\n(" )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.