Learn R Programming

spdep (version 0.1-10)

plotpolys: Plot polygons

Description

A helper function for plotting polygons in a global bounding box. get.polylist() is a simple function to make imported GIS vector polygons into a "polylist" object from a "Map" object; convert.pl() serves to convert the deprecated "multipart" "polylist" format to an NA-separated format now used by plotpolys and poly2nb

Usage

plotpolys(pl, bb, col = NA, border = par("fg"), add = FALSE, xlim, ylim)
get.polylist(Map, region.id=NULL)
convert.pl(pl)

Arguments

pl
list of polygons of class polylist
bb
matrix of polygon bounding boxes - columns are LL(x), LL(y), UR(x), UR(y)
col
colurs to use for filling the polygons
border
the color to draw the border
add
add to existing plot
xlim, ylim
numeric of length 2, giving the x and y coordinates ranges
Map
object of class Map, imported from a GIS polygon vector file using unpublished package "maptools"
region.id
character vector of region ids to be added to the neighbours list as attribute region.id

See Also

poly2nb

Examples

Run this code
example(poly2nb)

Run the code above in your browser using DataLab