polymap: Graphics

View source: R/polymap.S

polymapR Documentation

Graphics

Description

Plots point and polygon data sets on the current graphics device.

Usage

polymap(poly,add=FALSE,xlab="",ylab="",axes=TRUE, asp,...)

Arguments

poly

a polygon.

add

if FALSE, start a new plot. If TRUE, superimpose on current plot.

xlab, ylab

Label strings for x and y axes.

axes

if true, display axes with labelling. If false, do not display any axes on the plot.

asp

aspect parameter for plot

...

Graphical arguments may be entered, and these are passed to the standard S points and polygon routines.

Details

The specified data set is plotted on the current graphics device, either as points or polygons. For polymap, the last point in the data set is drawn connected to the first point. pointmap and polymap preserve the aspect ratio in the data by using the asp=1 plot argument. Graphical parameters can also be supplied to these routines, and are passed through to plot. Some useful parameters include pch to change the plotting character for points, lty to change the line type for polygons, and type="n" to just set up axes for the plot without plotting anything.

References

Rowlingson, B. and Diggle, P. 1993 Splancs: spatial point pattern analysis code in S-Plus. Computers and Geosciences, 19, 627-655; the original sources can be accessed at: https://www.maths.lancs.ac.uk/~rowlings/Splancs/. See also Bivand, R. and Gebhardt, A. 2000 Implementing functions for spatial statistical analysis using the R language. Journal of Geographical Systems, 2, 307-317.

See Also

par, mpoint

Examples

data(bodmin)
plot(bodmin$poly, asp=1, type="n")
pointmap(as.points(bodmin), add=TRUE)
polymap(bodmin$poly, add=TRUE)

splancs documentation built on May 29, 2024, 6:22 a.m.

Related to polymap in splancs...