colorCusGrinf: Customed Color Generation by the Number of the Levels

Description Usage Arguments Value Examples

View source: R/colorCusGrinf.R

Description

A function for generation of colors by the numebr of levels for use in the map making.

Usage

1
colorCusGrinf(brkpts, cols)

Arguments

brkpts

a vector to contain the breakpoints

cols

Selection of colors for different timelines.

Value

A colors of gradient levels

Examples

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=""))

lspatial/sptemUS documentation built on May 29, 2019, 3:42 a.m.