Title: | Venn and Euler Diagrams |
---|---|
Description: | Calculates and displays Venn and Euler Diagrams. |
Authors: | Lee Wilkinson <[email protected]> |
Maintainer: | Simon Urbanek <[email protected]> |
License: | MPL-1.1 |
Version: | 1.1-4 |
Built: | 2024-11-05 02:40:30 UTC |
Source: | https://github.com/s-u/venneuler |
plot
method for Venn diagrams
Plots the Venn diagram returned by venneuler
.
## S3 method for class 'VennDiagram' plot(x, col, col.fn = function(col) hcl(col * 360, 130, 60), alpha = 0.3, main = NULL, edges = 200, border = NA, col.txt = 1, cex = 1, lwd = 1, lty = 1, font = NULL, family = "", ...)
## S3 method for class 'VennDiagram' plot(x, col, col.fn = function(col) hcl(col * 360, 130, 60), alpha = 0.3, main = NULL, edges = 200, border = NA, col.txt = 1, cex = 1, lwd = 1, lty = 1, font = NULL, family = "", ...)
x |
object of the class |
col |
optional, vector of colors (as accepted by the graphics
system) to use. The colors are recycled if necessary (so
passing a scalar will result in all circles having the same color).
If not specified, colors are obtained by calling |
col.fn |
function taking one argument (numeric vector of values
between 0 and 1), returning a vector of colors of the same
length. It is not used if the |
alpha |
numeric, value of the alpha channel(s) for the colors
(hence their opacity). It will override any alpha channel
information in the color specification, recycling as neeed. If set
to |
main |
passed to |
edges |
integer scalar, specifies the number of edges to use when drawing circles |
border |
color of the border for each circle (recycled) or
|
lwd |
line width used to draw borders of the circles |
lty |
line type used to draw borders of the circles |
col.txt |
passed as |
cex |
passed to |
font |
passed to |
family |
passed to |
... |
any further arguments passed to |
Returns NULL
invisibly.
Simon Urbanek
vd <- venneuler(c(A=0.3, B=0.3, C=1.1, "A&B"=0.1, "A&C"=0.2, "B&C"=0.1 ,"A&B&C"=0.1)) plot(vd, border=1, lwd = c(1,1,3), cex=2)
vd <- venneuler(c(A=0.3, B=0.3, C=1.1, "A&B"=0.1, "A&C"=0.2, "B&C"=0.1 ,"A&B&C"=0.1)) plot(vd, border=1, lwd = c(1,1,3), cex=2)
venneuler
calculates a Venn diagram from a set specification.
venneuler(combinations, weights, ...)
venneuler(combinations, weights, ...)
combinations |
This can be one of:
For convenience data frames can be passed instead of matrices and they
will be coerced using |
weights |
If |
... |
Additional arguments (currently unused). |
An object of the class VennDiagram
with following components:
centers |
centers of the circles (columns are |
diameters |
diameters of the circles |
colors |
colors of the circles as values between 0 and 1 |
labels |
labels of the circles |
residuals |
residuals (percentage difference between input intersection area and fitted intersection area) |
stress |
stress value for solution |
stress01 |
.01 critical value for stress based on random data |
stress05 |
.05 critical value for stress based on random data |
Lee Wilkinson <[email protected]>, R package: Simon Urbanek <[email protected]>
vd <- venneuler(c(A=0.3, B=0.3, C=1.1, "A&B"=0.1, "A&C"=0.2, "B&C"=0.1 ,"A&B&C"=0.1)) plot(vd) # same as c(A=1, `A&B&C`=1, C=1) m <- data.frame(elements=c("1","2","2","2","3"), sets=c("A","A","B","C","C")) v <- venneuler(m) plot(v) m <- as.matrix(data.frame(A=c(1.5, 0.2, 0.4, 0, 0), B=c(0 , 0.2, 0 , 1, 0), C=c(0 , 0 , 0.3, 0, 1))) # without weights v <- venneuler(m > 0) plot(v) # with weights v <- venneuler(m) plot(v)
vd <- venneuler(c(A=0.3, B=0.3, C=1.1, "A&B"=0.1, "A&C"=0.2, "B&C"=0.1 ,"A&B&C"=0.1)) plot(vd) # same as c(A=1, `A&B&C`=1, C=1) m <- data.frame(elements=c("1","2","2","2","3"), sets=c("A","A","B","C","C")) v <- venneuler(m) plot(v) m <- as.matrix(data.frame(A=c(1.5, 0.2, 0.4, 0, 0), B=c(0 , 0.2, 0 , 1, 0), C=c(0 , 0 , 0.3, 0, 1))) # without weights v <- venneuler(m > 0) plot(v) # with weights v <- venneuler(m) plot(v)