Learn R Programming

rasterVis (version 0.51.6)

rasterTheme: Themes for raster with lattice.

Description

Auxiliary functions for the customization of trellis graphics with lattice.

xscale.raster and yscale.raster suppress the right and top axis, respectively. xscale.raster.subticks and yscale.raster.subticks also suppress those axis and draw subticks.

rasterTheme is a customization of the custom.theme.2 function of latticeExtra using the magma palette of the viridis package. The other palettes provided by this package are available through the viridisTheme, infernoTheme, and plasmaTheme.

YlOrRdTheme, BuRdTheme, RdBuTheme, GrTheme and BTCTheme are variations of rasterTheme using palettes of the RColorBrewer and hexbin packages.

streamTheme is a variation of rasterTheme using black for the region, gray for the panel background and a sequential palette for points.

bwTheme is a variation of rasterTheme for the bwplot methods.

Usage

yscale.raster(lim, ...)
xscale.raster(lim, ...)
yscale.raster.subticks(lim, ...)
xscale.raster.subticks(lim, ...)

rasterTheme(region = magma(10), pch=19, cex=0.7, strip.background = list(col = 'transparent'), strip.shingle = list(col = 'transparent'), strip.border = list(col = 'transparent'), add.lines = list(lwd = .4), ...)

magmaTheme(region = magma(10), ...) infernoTheme(region = inferno(10), ...) plasmaTheme(region = plasma(10), ...) viridisTheme(region = viridis(10), ...) YlOrRdTheme(region = brewer.pal(9, 'YlOrRd'), ...) RdBuTheme(region = brewer.pal(9, 'RdBu'), ...) BuRdTheme(region = rev(brewer.pal(9, 'RdBu')), ...) PuOrTheme(region = brewer.pal(9, 'PuOr'), ...) GrTheme(region = rev(brewer.pal(9, 'Greys')), ...) BTCTheme(region = BTC(n=9), ...)

streamTheme(region = 'black', symbol = brewer.pal(n=5, name='Blues'), alpha = 0.6, panel.background = list(col='gray20'), ...)

bwTheme(box.rectangle = list(col='black', fill = 'gray'), box.umbrella = list(col = 'black', lty = 1), plot.polygon = list(col = 'lightblue', alpha = 0.5), plot.symbol = list(cex = 0.5, alpha = 0.2), ...)

Arguments

lim

Range of data.

pch

Symbol used for points.

cex

A numeric multiplier to control the size of the points.

region

A vector of colors that is used to define a continuous color gradient using colorRampPalette to fill in regions. Note that the length of this gradient is set by custom.theme to exactly 100 colors.

symbol

A palette to display symbols.

panel.background

Parameters of the panel background.

alpha, ...

Additional arguments for custom.theme.2, yscale.components.default and xscale.components.default

strip.background, strip.shingle, strip.border

List whose components define the configuration of the strip areas. Read the help page of trellis.par.get for details.

add.lines

List whose components define the lines superposed on the graphic. Read the help page of trellis.par.get for details.

box.rectangle

List whose components define the box of the boxplot.

box.umbrella

List whose components define the whiskers of the boxplot.

plot.polygon

List whose components define the violin plot.

plot.symbol

List whose components define the raw points when draw.points = TRUE.

Author

Oscar Perpiñán Lamigueiro

See Also

custom.theme, custom.theme.2, BTC, xscale.components.default, xscale.components.subticks