b02-1-ColorCodedPair-class: Class "ColorCodedPair"

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

Description

This class represents a vector of (x,y) pairs, each of which should be plotted in a specific color with a specific symbol.

Usage

1
2
3
ColorCodedPair(x, y, ccl)
## S4 method for signature 'ColorCodedPair,missing'
plot(x, y, ...)

Arguments

x

numeric vector (for ColorCodedPair) or an object of class ColorCodedPair (for plot)

y

numeric vector

ccl

list of ColorCoding objects

...

additional arguments are as in the underlying generic methods.

Details

It is often necessary with microarray data to produce multiple plots, where each point on the plot corresponds to a gene or a spot on the microarray. Across multiple plots, we often want to use symbols or colors to mark subsets of he genes with certain properties. The ColorCodedPair class works in tandem with the ColorCoding class to make it easier to maintain consistent plotting conventions across multiple graphs.

Value

The constructor returns a valid ColorCodedPair object.

The plot method invisibly returns the object being plotted.

Slots

x

numeric vector

y

numeric vector

colorCodingList

list of ColorCoding objects

Methods

plot(object, ...)

Plot the ColorCodedPair object, with appropriate colors and symbols (of course).

Author(s)

Kevin R. Coombes krc@silicovore.com, P. Roebuck proebuck@mdanderson.org

See Also

colorCode, ColorCoding

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
showClass("ColorCodedPair")

theta <- (0:360)*pi/180
x <- cos(theta)
y <- sin(theta)
xp <- x > 0
yp <- y > 0
colors <- list(ColorCoding(xp&yp, oompaColor$EXPECTED),
               ColorCoding(xp&!yp, oompaColor$OBSERVED),
               ColorCoding(!xp&yp, oompaColor$PERMTEST),
               ColorCoding(!xp&!yp, oompaColor$FITTED))
plot(ColorCodedPair(x, y, colors))

plot(ColorCodedPair(theta, x, colors))

plot(ColorCodedPair(theta, y, colors),
     xlab='angle in radians', ylab='sine', main='colored sine')

oompaBase documentation built on Aug. 20, 2019, 3 a.m.