ColorBy: Assign colors using one or two numeric vectors

Description Usage Arguments Value Author(s) Examples

Description

These functions are intended to be used to color plotting symbols according to some numeric values or pair of numeric values associated with each point

Usage

1
2
ColorBy(x, palette)
ColorBy2(x,y,palette1, palette2, mode = "RGB")

Arguments

x

A vector of numeric values to color the points by

y

A vector of numeric values to color the points by, must be of the same length as x

palette

A vector of colors

palette1

A vector of colors

palette2

A vector of colors

mode

Specifies whether color mixtures should be in "RGB" or "HSV" mode

Value

A vector of colors of the same length as x

Author(s)

Brody Sandel

Examples

1
2
3
4
5
6
7
8
x = runif(100)
y = runif(100)

colors = ColorBy(x,rainbow(100))
plot(x,y,col=colors,pch=16,cex=2)

colors = ColorBy2(x,y,SetSaturation("Red",seq(0,1,0.1)),SetSaturation("Blue",seq(0,1,0.1)))
plot(x,y,col=colors,pch=16,cex=2)

painter documentation built on May 2, 2019, 10:46 a.m.

Related to ColorBy in painter...