draw.shape {mapplots} | R Documentation |
Draw shapefiles in an existing plot
Description
Draw shapefiles in an existing plot
Usage
draw.shape(shape, type = "poly", col = 1, ...)
Arguments
shape |
a shape list object created by ( |
type |
type of plot desired. The following values are possible: |
col |
the colour of the points, lines or polygons |
... |
Note
The shapefile needs to have the WGS 84 Geographic Coordinate System in order to display properly on a map of longitude and latitude.
Author(s)
Hans Gerritsen
See Also
Examples
library(shapefiles)
shp.file <- file.path(system.file(package = "mapplots", "extdata"), "Ireland")
irl <- read.shapefile(shp.file)
xlim <- c(-11,-5.5)
ylim <- c(51.5,55.5)
basemap(xlim, ylim)
draw.shape(irl, col="cornsilk")
[Package mapplots version 1.5.2 Index]