plot_percentile_map: plot_percentile_map

Description Usage Arguments Examples

View source: R/plot_percentile_map.R

Description

This function plots the maps of percentiles

Usage

1
2
3
4
5
6
7
plot_percentile_map(
  maps,
  region = "GLOB",
  add_background = FALSE,
  col = NULL,
  ...
)

Arguments

maps

is the result of get_percentile_map()

region

string of characters describing the region.

add_background

logical, TRUE (default) to show background map. This only works if longitudes of maps are in the range [-180, +180]

col

custom color palette (default is 'dput(rev(RColorBrewer::brewer.pal(n = 10, name = "RdYlGn")))')

...

additional graphical parameters inherited from plot() in the raster package.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
  # Generate dummy RasterLayer
  r <- raster(nrows = 2, ncols = 2, xmn = 0, xmx = 360, ymn = -90, ymx = 90, vals = 30)
  # Generate dummy RasterBrick
  b <- raster::brick(lapply(1:(365 * 3),
                     function(i) raster::setValues(r,
                     runif(n = raster::ncell(r), min = 0, max = 100))))
  # Get percentile maps
  maps <- get_percentile_map(b, probs = c(0.50, 0.75, 0.90, 0.99))
 
  # Use default palette
  plot_percentile_map(maps)

## End(Not run)

caliver documentation built on Feb. 19, 2021, 5:07 p.m.