palr
provides colour palettes for data, based on some well known remotely sensed data sets for sea ice concentration, sea surface temperature and chlorophyll-a.
There are four main ways of working with palr palette functions, which have names like icePal
, chlPal
and sstPal
for ice, chlorophyll-a and sst respectively and mk_timePal
for creating a time-mapped palette function.
icePal(n)
return n colours from the paletteicePal(data)
return the right colour for values in data
icePal(palette = TRUE)
returns the entire palette, with colours cols
and intervals breaks
tfun <- mk_timePal(datetimes, pal); plot(x, tfun(dt))
match date-times to a palette, or palette function.There is a vignette illustrating basic usage, this can be read on CRAN or loaded from within R.
Run this code to load the vignette within R:
library(palr)
vignette("palr")
This repository holds the current development version of the contributed R-package palr
.
This development version is more recent than the current release of palr
on CRAN.
Users of palr
are encouraged to report bugs and make feature requests here (click Issues in the menu on the right to start a new bug report or feature request).
Feel free to fork palr
and make pull requests.
palr
is a companion package to the data package raadtools
, but is not tied to it.
Install the current release from CRAN using
install.packages("palr")
The easiest way to install the github version of palr
is through the devtools
package:
library(devtools)
install_github("AustralianAntarcticDivision/palr")
If you don't have devtools
installed you should first run
install.packages('devtools')