germany {spam} | R Documentation |
Constructing the adjacency graph and displaying the data over the administrative districts of Germany
adjacency.landkreis( loc) map.landkreis(data, col=NULL, zlim=range(data), add=FALSE, legendpos=c( 0.88,0.9,0.05,0.4))
loc |
location of the graph structure, can be an URL. |
data |
vector of length 544 |
col |
color scheme to be used. By default uses |
zlim |
the minimum and maximum values for which colors should be
plotted, defaulting to the range of |
add |
logical, if true adds to current plot. |
legendpos |
if package fields is loaded, puts a legend at that position. |
adjacency.landkreis
is included as an example on how to
construct adjacency matrices form a (common) adjacency structure.
For the particular example, note that the nodes are not numbered
consecutively and that they start from zero.
The perfect position of the legend is an art per se and depends on
various par
parameters. See also the source code of the function
image.plot
of fields.
Reinhard Furrer
The code of map.landkreis
is very similar to
germany.map
from the package INLA.
Oral
.
loc <- system.file("demodata/germany.adjacency", package="spam") display( adjacency.landkreis( loc)) map.landkreis( Oral$E)