polymap | R Documentation |
Plots point and polygon data sets on the current graphics device.
polymap(poly,add=FALSE,xlab="",ylab="",axes=TRUE, asp,...)
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 |
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.
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.
par
, mpoint
data(bodmin)
plot(bodmin$poly, asp=1, type="n")
pointmap(as.points(bodmin), add=TRUE)
polymap(bodmin$poly, add=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.