Venn | R Documentation |
Venn
Venn diagram (also known as Euler diagram). Minimizes sum of squared residuals to find the best overlap. Where no diagram appears, it is likely that there is a problem with the inputs. This is a wrapper for http://www.buildingwidgets.com/blog/2015/6/5/week-22-d3vennr, which in turn is a wrapper for http://www.benfrederickson.com/venn-diagrams-with-d3.js/.
Venn(
x = NULL,
weights = NULL,
colors = c("#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "#8c564b", "#e377c2",
"#7f7f7f", "#bcbd22", "#17becf"),
opacity = NULL,
global.font.family = "Arial",
data.label.font.autocolor = TRUE,
data.label.font.color = "#FFFFFF",
data.label.font.family = global.font.family,
data.label.font.size = 14,
hovertext.font.family = global.font.family,
hovertext.font.size = 14,
values.hovertext.format = ""
)
x |
A data.frame |
weights |
An optional vector of weights, or, the name or, the name of a variable in |
colors |
A character vector specifying the color of each circle. |
opacity |
Numeric; Opacity of circles as an alpha value (0 to 1). |
global.font.family |
Font family of all text elements. These can be overriden for individual text elements. |
data.label.font.autocolor |
Logical; Whether font color should be automatically set to the same as the circle color. When this is true, |
data.label.font.color |
Font color of data labels (ignored if |
data.label.font.family |
Font family of data labels. |
data.label.font.size |
The font size of the labels. Defaults to 20. |
hovertext.font.family |
Font family of hovertext (i.e tooltips). |
hovertext.font.size |
Font size of hovertext in pixels. |
values.hovertext.format |
A string representing a d3 formatting code.
See https://github.com/mbostock/d3/wiki/Formatting#numbers. This option only applies when |
Venn(list(
list("sets"= list(0), "label"= "Like", "size"= 100),
list("sets"= list(1), "label"= "Love", "size"= 50),
list("sets"= list(2), "label"= "Dislike", "size"= 100),
list("sets"= list(3), "label"= "Hate", "size"= 50),
list("sets"= list(0, 1), "size"= 50),
list("sets"= list(0, 2), "size"= 0),
list("sets"= list(2, 3), "size"= 50)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.