Description Usage Arguments Value Author(s) See Also Examples
Plots the column vectors in the colorspace matrix versus the index.
1 2 |
index |
|
xlab,ylab |
The labels on the x and the axis. |
transpose |
If |
... |
Other arguments accepted by |
Returns nothing.
Henrik Bengtsson (http://www.braju.com/R/)
For more information see Color
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | x <- 0:100/100
ch1 <- (sin(x*2*pi) + 1)/2
ch2 <- (cos(x*2*pi) + 1)/2
rg <- TwoChannelMicroarrayColor(ch1, ch2, maxColorValue=1)
layout(matrix(1:2))
plotParallel(rg)
plotParallel(rg, col=c("red", "green"), transpose=TRUE)
# One-dimensional colors
ncolors <- 256
x <- seq(0,1, length=ncolors)
ch1 <- x
ch2 <- rev(x)
colors <- list(
# One-dimensional colors
red = RedColor(x),
green = GreenColor(x),
blue = BlueColor(x),
gray = GrayColor(x),
spectrum = WavelengthColor(seq(380,779,length=ncolors)),
heat = HeatColor(x),
rainbow = RainbowColor(x),
topo = TopologyColor(x),
terrain = TerrainColor(x),
cm = CyanMagentaColor(x),
# Two-dimensional colors
rg = TwoChannelMicroarrayColor(ch1,ch2, maxColorValue=1),
yb = TwoChannelMicroarrayColor(ch1,ch2, hueRange=c(HsvgColor$YELLOW.HUE,HsvgColor$BLUE.HUE), maxColorValue=1),
# Three-dimensional colors
rgb = RgbColor(x,rev(x),sample(x)),
hcl = HclColor(x),
# Four-dimensional colors
hsvg = HsvgColor(x),
cmyk = CmykColor(x,sample(x),rev(x),x/2)
)
layout(matrix(1:16, ncol=4, byrow=TRUE))
opar <- par(mar=c(0,1,3,1)+0.5)
for(color in colors)
plotParallel(RgbColor(color))
par(opar)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.