Learn R Programming

Sushi (version 1.10.0)

maptocolors: maps numeric vector to color palette

Description

maps numeric vector to color palette

Usage

maptocolors(vec, col, num = 100, range = NULL)

Arguments

vec
numeric vector to map to color
col
color palette to which to be mapped
num
number of bins of colors
range
range of values to map

Examples

Run this code
plot((1:10),col=maptocolors(vec=(1:10),colorRampPalette(c("blue","red"))),pch=19,cex=4)

Run the code above in your browser using DataLab