This function plots Raster and sp-type objects.
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", ...)
None.
Object to be plotted
arguments passed to class-specific methods.
(character) Color or color scheme of the plot. See ramps for available palettes (ipccLine and ipccRCP are not available).
(logical) Should axes be displayed?
(logical) Should bounding boxes be displayed?
(logical) Triggers whether the legend of a RasterLayer would be plotted.
(character) Title for the legend, if legend = TRUE.
set to (TRUE) to make a red-green-blue plot based on three layers or bands.
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.
(character) The title for each individual plot. Only available for a single variable at the moment.
(character) label for each row of the overall plot. Uses the rownames of the RasterArray by default. Only availble for multivariate RasterArrays.
(logical) Should the plots be printed on multiple pages?
(logical or NULL) If multi.page = TRUE and ask = TRUE, then the user will be prompted before a new page of output is started
#single variable
data(dems)
mapplot(dems, ncol=4)
Run the code above in your browser using DataLab