Usage
mappoints(shpfile,longvar,latvar,pointvar,sampvar=NULL,nclass=8,
col="RdBu",pointsize=.6,colreverse=TRUE,xlimfact=c(1,1),ylimfact=c(1,1),
legendloc=NULL,legendsize=.75,legenddigits=4,title=NULL)
Arguments
shpfile
The shape file, a polygon map showing areas.
longvar
Longitude variable for the point data, in degrees.
latvar
Latitude variable for the point data, in degrees.
pointvar
The variable to be mapped.
sampvar
A variable indiciating which observations to include in the map. Tracts for which sampvar=F will not be drawn.
nclass
The number of classes used when mapping pointvar. Default: nclass=8.
col
Color scheme for the map. All of RColorBrewer's schemes are available, e.g., "Blues", "BuGn", "BuPu", and "GnBu".
Default: "RdBu"
pointsize
The size of the points drawn on the map. Fed directly to the cex option for the points command. Default: pointsize=.6.
colreverse
If TRUE, reverses the order of the color ramp for the col options. Default: colreverse=T.
xlimfact
A vector of factors used to adjust the limits for the box around the map. The limits for the x-axis (i.e., the longitudes) are
xlim=c(min(longvar),max(longvar))*xlimfact. Since the geographic coordinates are expressed in degrees, small adjustments wil
ylimfact
The counterpart to xlimfact for the y (i.e., latitude) axis. Default: ylimfact = c(1,1).
legendloc
The location for the legend, e.g., "topleft" or "bottom". By default, the legend is omitted.
legendsize
The font size for the legend. Fed directly to the cex option for the legend command. Default: legendsize=.75.
legenddigits
Number of significant digits for the numbers shown in the legend. Default: legenddigits = 4.
title
A title for the map.