rcosmo (version 1.1.2)

numeric2col: numeric2col

Description

Map numeric values to a colour map

Usage

numeric2col(num, colmap = grDevices::terrain.colors(100),
  breaks.length = length(colmap))

Arguments

num

A numeric vector. The numbers which will be mapped to colours.

colmap

A colour map. See palette.

breaks.length

A single integer. Controls the number of breaks in the discretisation of num.

Examples

Run this code
# NOT RUN {
ns <- 16
sky <- CMBDataFrame(I = rnorm(12*ns^2), nside = ns)
plot(sky, col = numeric2col(sky$I))

# }

Run the code above in your browser using DataLab