Description Usage Arguments Value Examples
View source: R/colorCusGrinf.R
A function for generation of colors by the numebr of levels for use in the map making.
1 | colorCusGrinf(brkpts, cols)
|
brkpts |
a vector to contain the breakpoints |
cols |
Selection of colors for different timelines. |
A colors of gradient levels
1 2 3 4 5 6 7 8 9 | data("spointspre","countylayer")
praster=points2Raster(spointspre,"d91")
dtStr=as.character(as.Date(91,origin=as.Date("2014-01-1")))
title=expression("PM"[2.5]*" Concentration Estimated")
par(mar=c(4,4,1,1))
breakpoints = c(0,50,100,200,350,600)
colors=colorCusGrinf(breakpoints,c("darkgreen","yellow","darkred"))
raster::plot(praster,breaks=breakpoints,col=colors,
main=title,xlab=paste("Shandong Province, China (",dtStr,")",sep=""))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.