hcols: Aesthetically pleasing color ramp for plotting habitat...

Description Usage Arguments Value Examples

Description

Aesthetically pleasing color ramp for plotting habitat suitability

Usage

1
hcols(x, bias = 1)

Arguments

x

number of colors to return

bias

a positive number. Higher values give more widely spaced colors at the high end (as in colorRampPalette).

Value

Returns a character vector of colors (see rgb) interpolating the given sequence (similar to heat.colors or terrain.colors.

Examples

1
2
3
4
library(ggplot2)
data=cbind.data.frame(expand.grid(x=1:10,y=1:10),z=rnorm(100))
ggplot(data,aes(x=x,y=y,fill=z))+geom_raster()+
scale_fill_gradientn(colours=hcols(20,bias=2))

bossMaps documentation built on May 2, 2019, 3:57 p.m.