VennThemes: Create lists of graphical parameters for Venn diagrams

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/03VennDrawing.R

Description

Given a VennDrawing object, which it consults to find the names of each of the sets and faces in the drawing, returns a list suitable as the gp argument in a subsequent call to the VennDrawing method for plot.

Usage

1
VennThemes(drawing, colourAlgorithm, increasingLineWidth)

Arguments

drawing

An object of class VennDrawing

colourAlgorithm

Missing or one of signature,binary,sequential.

increasingLineWidth

Logical, defaul FALSE

Details

Set boundary colours are taken from the Set1 palette provided by the RColorBrewer package. If colourAlgorithm="signature", face fill colours are taken frome the RColorBrewer YlOrRed palette based on the number of sets represented in the face, so eg all the faces corresponding to membership of a single set are pale yellow while the face corresponding to all the intersections is dark red. If colourAlgorithm="binary", faces are blue if they correspond to an odd number of intersections and white otherwise. If colourAlorithm="sequential", each face is given a different colour from the RColorBrewer Set3 palette, although this is repeated if necessary if there are more faces than the length of this palette (9). Different faces with the same signature will be given the same colour. If not specified, sequential is used if there are less than 9 faces, otherwise signature.

If increasingLineWidth=TRUE, each Set is given a different linewidth, with the last to be plotted given the thinnest width, to help in visualising nonsimple Venn diagrams.

Value

A list with four elements

Face

Named list of graphical parameters which will be applied to faces with corresponding names

FaceText

Named list of graphical parameters which will be applied to annotation in faces with corresponding names

Set

Named list of graphical parameters which will be applied to sets with corresponding names

FaceText

Named list of graphical parameters which will be applied to annotation in sets with corresponding names

These are graphical parameters in the sense of the grid package.

Author(s)

Jonathan Swinton ([email protected])

See Also

See also RColorBrewer

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# change the name of one set  to red text and enlarge the other
C2 <- compute.Venn(Venn(n=2))
gp <- VennThemes(C2)
gp[["SetText"]][["Set1"]]$col <-  "red";
gp[["SetText"]][["Set2"]]$cex <- 2;
plot(C2,gp=gp)
# use  highlevel arguments
gp <- VennThemes(C2,colourAlgorithm="binary")
plot(C2,gp=gp)
gp <- VennThemes(C2,increasingLineWidth=TRUE)
plot(C2,gp=gp)

Vennerable documentation built on May 31, 2017, 4:02 a.m.