Learn R Programming

cartography (version 1.3.0)

layoutLayer: Layout Layer

Description

Plot a layout layer.

Usage

layoutLayer(title = "Title of the map, year", sources = "Source(s)", author = "Author(s)", col = "black", coltitle = "white", bg = NULL, scale = 0, frame = TRUE, north = FALSE, south = FALSE, extent = NULL)

Arguments

title
title of the map.
sources
sources of the map (or something else).
author
author of the map (or something else).
col
color of the frame border.
coltitle
color of the title.
bg
color of the frame background.
scale
size of the scale in kilometers. If set to NULL, no scale is displayed, if set to 0 an automatic scale is displayed (1/10 of the map width).
frame
wheither displaying a frame (TRUE) or not (FALSE).
north
wheither displaying a Noth arrow (TRUE) or not (FALSE).
south
wheither displaying a South arrow (TRUE) or not (FALSE).
extent
a SpatialPolygonsDataFrame or a SpatialPointsDataFrame; set the extent of the frame to the one of a Spatial object. (optional)

Details

If extent is not set, plot.new has to be called first. The size of the title box in layoutLayer is fixed to 1.2 lines height.

See Also

labelLayer

Examples

Run this code
data("nuts2006")
# Example 1
plot(nuts0.spdf, col = "grey60",border = "grey20", add=FALSE)
# Layout plot
layoutLayer()

# Example 2
plot(nuts0.spdf, col=NA, border = NA, bg ="#A6CAE0")
plot(world.spdf, col  = "#E3DEBF", border=NA, add=TRUE)
plot(nuts0.spdf, col = "#D1914D",border = "white", lwd=1, add=TRUE)
layoutLayer(col = NA, coltitle = "black",
            sources = "", author = "",
            frame = FALSE,
            south = TRUE)

Run the code above in your browser using DataLab