mapplot: Wrapper function to plot maps of different classes

Description Usage Arguments Value Examples

Description

This function plots Raster and sp-type objects.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
mapplot(x, ...)

## S4 method for signature 'RasterLayer'
mapplot(
  x,
  col = "gradinv",
  axes = FALSE,
  box = FALSE,
  legend = FALSE,
  legend.title = NULL,
  ...
)

## S4 method for signature 'RasterStack'
mapplot(x, col = gradinv(255), ...)

## S4 method for signature 'RasterArray'
mapplot(
  x,
  col = "gradinv",
  rgb = FALSE,
  legend = FALSE,
  axes = FALSE,
  box = FALSE,
  ncol = 3,
  legend.title = NULL,
  plot.title = NULL,
  rowlabels = rownames(x),
  multi = FALSE,
  ask = FALSE,
  ...
)

## S4 method for signature 'SpatialPolygonsDataFrame'
mapplot(x, col = "lightgrey", ...)

## S4 method for signature 'SpatialPolygons'
mapplot(x, col = "lightgrey", ...)

Arguments

x

Object to be plotted

...

arguments passed to class-specific methods.

col

(character) Color or color scheme of the plot. See ramps for available palettes (ipccLine and ipccRCP are not available).

axes

(logical) Should axes be displayed?

box

(logical) Should bounding boxes be displayed?

legend

(logical) Triggers whether the legend of a RasterLayer would be plotted.

legend.title

(character) Title for the legend, if legend = TRUE.

rgb

set to (TRUE) to make a red-green-blue plot based on three layers or bands.

ncol

numeric) Set number of columns in a multi-plot for a single variable. For a RasterArray with multiple variables, this number is automatically set to the number of variables.

plot.title

(character) The title for each individual plot. Only available for a single variable at the moment.

rowlabels

(character) label for each row of the overall plot. Uses the rownames of the RasterArray by default. Only availble for multivariate RasterArrays.

multi

(logical) Should the plots be printed on multiple pages?

ask

(logical or NULL) If multi.page = TRUE and ask = TRUE, then the user will be prompted before a new page of output is started

Value

None.

Examples

1
2
3
4
 #single variable
	data(dems)
	mapplot(dems, ncol=4)
	

chronosphere documentation built on April 19, 2021, 1:07 a.m.