File: polys.plot.Rd

package info (click to toggle)
mgcv 1.9-4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,476 kB
  • sloc: ansic: 14,143; makefile: 2
file content (52 lines) | stat: -rwxr-xr-x 1,875 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
\name{polys.plot}
\alias{polys.plot}
\title{Plot geographic regions defined as polygons}
\usage{
polys.plot(pc,z=NULL,scheme="heat",lab="",...)
}

\arguments{
  \item{pc}{A named list of matrices. Each matrix has two columns. The matrix rows each define the 
   vertex of a boundary polygon. If a boundary is defined by several polygons, then each of these must be 
   separated by an \code{NA} row in the matrix. See \code{\link{mrf}} for an example.}

  \item{z}{A vector of values associated with each area (item) of \code{pc}. If the vector elements 
  have names then these are used to match elements of \code{z} to areas defined in \code{pc}. Otherwise 
  \code{pc} and \code{z} are assumed to be in the same order. If \code{z} is \code{NULL} then polygons are not filled. }

  \item{scheme}{One of \code{"heat"} or \code{"grey"}, indicating how to fill the polygons in accordance with the value
   of \code{z}.}

  \item{lab}{label for plot.}
   
  \item{...}{other arguments to pass to plot (currently only if \code{z} is \code{NULL}).}


}

\value{Simply produces a plot.}

\description{ Produces plots of geographic regions defined by polygons, optionally filling the 
polygons with a color or grey shade dependent on a covariate.
}

\details{Any polygon within another polygon counts as a hole in the area. Further nesting is dealt with by 
treating any point that is interior to an odd number of polygons as being within the area, and all other points 
as being exterior. The routine is provided to facilitate plotting with models containing \code{\link{mrf}} smooths.
}

\author{Simon Wood \email{simon.wood@r-project.org}
}



\seealso{
\code{\link{mrf}} and \code{\link{columb.polys}}.
}
\examples{
## see also ?mrf for use of z
require(mgcv)
data(columb.polys)
polys.plot(columb.polys)
}
\keyword{hplot} \keyword{models} \keyword{smooth} \keyword{regression}