Description Usage Arguments Value Examples
Aesthetically pleasing color ramp for plotting habitat suitability
1 | hcols(x, bias = 1)
|
x |
number of colors to return |
bias |
a positive number. Higher values give more widely spaced colors at the high end (as in colorRampPalette). |
Returns a character vector of colors (see rgb
) interpolating
the given sequence (similar to heat.colors
or terrain.colors
.
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.