colorfulVennPlot-package: Venn diagram with user-specified colors for 2-dimensional,...

Description Details Author(s) Examples

Description

Plot Venn diagram of 2-dimensional, 3-dimensional and 4-dimensional data with user-specified custom colors.

Details

Package: plotVenn
Type: Package
Version: 2.4
Date: 2013-11-11
License: GPL-2

The package is designed to be able to plot Venn diagrams for 2-d, 3-d and 4-d data. The uniqueness of it is in being able to specify custom colors for each part of the plot - including the crossovers.

If data needs to be shaped into appropriate format for it, createVennData() can be used. Given 3 columns of data and values by which to split the data, createVennData() splits it into 7 groups and counts values in each group or percent allocations. Notice: currently, it only can be used to generate 3-dimensional data.

Author(s)

Elliot Noma, Aliona Manvae

Maintainer: Elliot Noma <noma@garrettassetmanagement.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
  data(survey, package = "MASS")
  # For more info: ?MASS::survey
  
  # Grouping students by Pulse, Height and Age
  vennData <- createVennData(survey,
    Cols = c("Pulse","Height","Age"),
    Splits = c(75, 170, 20),   ## Split Pulse at 75, split Height at 170, split Age at 20
    Labels = NULL,   ## Keep Labels NULL, as we wish to stick with Pulse, Height and Age titles.
    type = c("percent"))   ## generate data as percents

  # Plot Venn diagram
  # Notice: 
  # plotVenn is a generic function, which can be used to call plotVenn2d, plotVenn3d or plotVenn4d
  plot.new()
  plotVenn(vennData$x, vennData$labels)
  
  ##############################################
  # Example of 4-dimensional data plotting, with default data
  plot.new()
  plotVenn4d(Title = "Example of 4-d Venn diagram")

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