plotVenn3d: Plot Venn diagram for 3-dimensional data.

Description Usage Arguments Details Note Author(s) References Examples

View source: R/plotVenn3d.R

Description

Given a vector of 7 values, which describe 3-dimensional data, it plots up Venn diagram, i.e. 'crossing circles'. The user is able to specify values, labels for each circle-group and colors.

Usage

1
2
3
plotVenn3d(x, labels = c('A','B','C'), 
  Colors = c("red","yellow","orange","lightblue","purple","green","grey"), 
  Title = NULL, shrink=1, rot=0)

Arguments

x

a numeric vector of length 7, with names c("001","010","011","100","101","110","111") in suitable order.

labels

a character vector of length 3, providing names for the 3 dimensions.

shrink

a numeric value, specifying zooming effect of the plot.

Colors

a vector of color names for the backgrounds of each part of the diagram.

Title

a string containing the graph title.

rot

a numeric value for the number of degrees to rotate the graph.

Details

NOTICE: This only works for 3-dimensional data.

By definition, value '000' lays outside the plotted diagram. Therefore, it will not be plotted. Because of that, if plotting 'percent' data, all values will not add up to 100 percent, missing 000's allocation.

Note

It requires package grid to be installed, and can be plotted according to specified grid parameters.

Author(s)

Elliot Noma, Aliona Manvae

References

Original code: http://elliotnoma.wordpress.com/2011/02/09/venn-diagram/

Output file: http://elliotnoma.files.wordpress.com/2011/02/venndiagram.png

Examples

1
2
3
4
5
  y <- c(37,29,6,232,121,77,25)
  names(y) <- c("001","010","011","100","101","110","111")
  labels <- c("A","B","C")
  plot.new()
  plotVenn3d(y, labels, Colors=rainbow(7), Title = "This is an example of a 3D Venn plot")

Example output

Loading required package: grid

colorfulVennPlot documentation built on May 2, 2019, 2:47 p.m.