powered by
Map numeric values to a colour map
numeric2col( num, colmap = grDevices::terrain.colors(100), breaks.length = length(colmap) )
A numeric vector. The numbers which will be mapped to colours.
A colour map. See palette.
palette
A single integer. Controls the number of breaks in the discretisation of num.
num
# 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