Learn R Programming

chronosphere (version 0.4.1)

mapplot: Wrapper function to plot maps of different classes

Description

This function plots Raster and sp-type objects.

Usage

mapplot(x, ...)

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

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

# S4 method for 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 SpatialPolygonsDataFrame mapplot(x, col = "lightgrey", ...)

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

Value

None.

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

Examples

Run this code

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

Run the code above in your browser using DataLab