numeric2col: numeric2col

Description Usage Arguments Examples

View source: R/Conversion.R

Description

Map numeric values to a colour map

Usage

1
2
3
4
5
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

1
2
3
ns <- 16
sky <- CMBDataFrame(I = rnorm(12*ns^2), nside = ns)
plot(sky, col = numeric2col(sky$I))

rcosmo documentation built on Dec. 11, 2021, 9:29 a.m.