| 1 |
\name{panel.spplot} |
| 2 |
\alias{panel.spplot} |
| 3 |
\alias{panel.gridplot} |
| 4 |
\alias{panel.pointsplot} |
| 5 |
\alias{panel.polygonsplot} |
| 6 |
\alias{spplot.key} % needs docs! |
| 7 |
\alias{SpatialPolygonsRescale} |
| 8 |
\alias{sp.lines} |
| 9 |
\alias{sp.points} |
| 10 |
\alias{sp.polygons} |
| 11 |
\alias{sp.text} |
| 12 |
\alias{sp.grid} |
| 13 |
\alias{sp.panel.layout} |
| 14 |
\alias{longlat.scales} |
| 15 |
\alias{bbexpand} |
| 16 |
|
| 17 |
\title{panel and panel utility functions for spplot} |
| 18 |
\description{panel functions for spplot functions, and functions that can be |
| 19 |
useful within these panel functions } |
| 20 |
\usage{ |
| 21 |
spplot.key(sp.layout, rows = 1, cols = 1) |
| 22 |
SpatialPolygonsRescale(obj, offset, scale = 1, fill = "black", col = "black", |
| 23 |
plot.grid = TRUE, ...) |
| 24 |
sp.lines(obj, col = 1, ...) |
| 25 |
sp.points(obj, pch = 3, ...) |
| 26 |
sp.polygons(obj, col = 1, fill = "transparent", ...) |
| 27 |
sp.grid(obj, col = 1, alpha = 1,..., at = pretty(obj[[1]]), col.regions = col) |
| 28 |
sp.text(loc, txt, ...) |
| 29 |
sp.panel.layout(lst, p.number, ...) |
| 30 |
bbexpand(x, fraction) |
| 31 |
} |
| 32 |
\arguments{ |
| 33 |
\item{sp.layout}{ list; see \link{spplot} for definition } |
| 34 |
\item{rows}{ integer; panel row(s) for which the layout should be drawn } |
| 35 |
\item{cols}{ integer; panel column(s) for which the layout should be drawn } |
| 36 |
\item{obj}{ object of class \link{SpatialPolygons-class} for |
| 37 |
\code{SpatialPolygonsRescale}; of class \link{SpatialLines-class}, |
| 38 |
\link{Lines-class} or \link{Line-class} for \code{sp.lines} of a |
| 39 |
class that has a \link{coordinates-methods} for \code{sp.points}; of |
| 40 |
class \link{SpatialPolygons-class} for \code{sp.polygons}. When obj is |
| 41 |
character, the actual object is retrieved by \code{get(obj)} before its |
| 42 |
class is evaluated. } |
| 43 |
\item{offset}{ offset for shifting a Polygons object } |
| 44 |
\item{scale}{ scale for rescaling } |
| 45 |
\item{fill}{ fill color } |
| 46 |
\item{col}{ line color } |
| 47 |
\item{plot.grid}{logical; plot through grid functions (TRUE), or through |
| 48 |
traditional graphics functions (FALSE)} |
| 49 |
\item{pch}{ plotting character } |
| 50 |
\item{at}{ numeric; values at which colour breaks should occur } |
| 51 |
\item{col.regions}{ colours to fill the grid cells, defaults to col } |
| 52 |
\item{loc}{ numeric vector of two elements } |
| 53 |
\item{txt}{ text to be plotted } |
| 54 |
\item{alpha}{ alpha (transparency) level } |
| 55 |
\item{lst}{ sp.layout argument, see \link{spplot}} |
| 56 |
\item{p.number}{ panel number; in a panel, panel.number() should be |
| 57 |
passed to this argument } |
| 58 |
\item{x}{length two numeric vector, containing a range} |
| 59 |
\item{fraction}{fraction to expand the range by} |
| 60 |
\item{...}{ arguments passed to the underlying panel, lattice or |
| 61 |
grid functions } |
| 62 |
} |
| 63 |
\note{ |
| 64 |
The panel functions of \link{spplot}, \code{panel.gridplot} for grids, |
| 65 |
\code{panel.pointsplot} for points, or \code{panel.polygonsplot} for lines |
| 66 |
or polygons can be called with arguments \code{(x,y,...)}. |
| 67 |
Customizing spplot plots can be done by extending the panel function, |
| 68 |
or by supplying an sp.layout argument; see the documentation for |
| 69 |
\link{spplot}. Inside these panel functions, \code{sp.panel.layout} |
| 70 |
is called to deal with plotting the items in a \code{sp.layout} object. |
| 71 |
|
| 72 |
\code{SpatialPolygonsRescale} scales and shifts an object of class |
| 73 |
\link{SpatialPolygons-class}; this is useful e.g. for scale bars, or other |
| 74 |
layout items. |
| 75 |
|
| 76 |
\code{sp.lines}, \code{sp.points}, \code{sp.polygons} and \code{sp.text} |
| 77 |
plot lines, points, polygons or text in a panel. |
| 78 |
|
| 79 |
\code{spplot.key} draws the \code{sp.layout} object at given rows/cols. |
| 80 |
|
| 81 |
\code{sp.pagefn} can be passed as a \code{page} argument, and will |
| 82 |
call function \code{spplot.key} for the last panel drawn on a page. |
| 83 |
} |
| 84 |
|
| 85 |
\references{ |
| 86 |
\url{https://edzer.github.io/sp/} has a graph gallery with |
| 87 |
examples with R code. |
| 88 |
} |
| 89 |
\seealso{\link{spplot}, \link{spplot-methods}} |
| 90 |
\author{ Edzer Pebesma, \email{[email protected]} } |
| 91 |
%\examples{} |
| 92 |
\keyword{dplot} |