Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mixColorRamps

Mixing color ramps


Description

mix different color ramps

Usage

mixColorRamps(vars, ramps)

mixColor1Ramps(vars, ramps = colorRamp(c("blue", "black", "red")))

mixColor2Ramps(vars, ramps = list(colorRamp(c("blue", "green")),
  colorRamp(c("blue", "red"))))

mixColor3Ramps(vars, ramps = list(colorRamp(c("#001A00", "#00E600")),
  colorRamp(c("#00001A", "#0000E6")), colorRamp(c("#1A0000", "#E60000"))))

Arguments

vars

a list of variables

ramps

a list of color ramps, one for each variable.

Details

automatically create colors to represent a varying number of dimensions.

Examples

cols <- expand.grid(x = seq(0, 1, length.out = 10),
                    y = seq(0, 1, length.out = 10),
                    z = seq(0, 1, length.out = 10))
mixed <- mixColor3Ramps(cols)

## Not run: 
library(rgl)
plot3d(cols$x, cols$y, cols$z, col = mixed, pch = 15)

cols <- expand.grid(x = seq(0, 1, length.out = 10),
                    y = seq(0, 1, length.out = 10))
mixed <- mixColor2Ramps(cols)

## End(Not run)

plot(cols$x, cols$y, col = mixed, pch = 15)

dimRed

A Framework for Dimensionality Reduction

v0.2.3
GPL-3 | file LICENSE
Authors
Guido Kraemer [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.