pairsmap {gmGeostats} | R Documentation |
Multiple maps Matrix of maps showing different combinations of components of a composition, user defined
Description
Multiple maps Matrix of maps showing different combinations of components of a composition, user defined
Usage
pairsmap(data, ...)
## S3 method for class 'SpatialPointsDataFrame'
pairsmap(data, ...)
## Default S3 method:
pairsmap(
data,
loc,
colscale = rev(rainbow(10, start = 0, end = 4/6)),
cexrange = c(0.1, 2),
scale = rank,
commonscale = FALSE,
mfrow = c(floor(sqrt(ncol(data))), ceiling(ncol(data)/floor(sqrt(ncol(data))))),
foregroundcolor = "black",
closeplot = TRUE,
...
)
Arguments
data |
data to represent; admits many data containing objects
(matrix, data.frame, classes from package |
... |
extra arguments for generic functionality |
loc |
matrix or data.frame of coordinates of the sample locations |
colscale |
set of colors to be used as colorscale (defauls to 10 colors between blue and red) |
cexrange |
symbol size min and max values (default to 0.1 to 2) |
scale |
function scaling the set of z-values of each map, defaults to |
commonscale |
logical, should all plots share a common z-scale? defaults to FALSE |
mfrow |
vector of two integers, giving the number of plots per row and per column of the matrix of plots to be created; defaults to something square-ish, somewhat wider than longer, and able to contain all plots |
foregroundcolor |
color to be used for the border of the symbol |
closeplot |
logical, should the plot be left open (FALSE) for further changes, or be frozen (TRUE)? defaults to TRUE |
Value
The function is primarily called for producing a matrix of plots of each component of a
multivariate data set, such as a compositional data set. Each plot represents a map whose symbols
are colored and sized according to a z-scale controlled by one of the variables of the data set.
It can be used virtually with any geometry, any kind of data (compositional, positive, raw, etc).
This function returns invisibly the graphical parameters that were active prior to calling this
function. This allows the user to add further stuff to the plots (mostly, using par(mfg=c(i,j))
to plot on the diagram (i,j)), or else freeze the plot (by wrapping the call to pwlrmap
on a call to par
).
Methods (by class)
-
SpatialPointsDataFrame
: Multiple maps -
default
: Multiple maps
Examples
data("Windarling")
library("compositions")
coords = as.matrix(Windarling[,c("Easting","Northing")])
compo = Windarling[,c("Fe","Al2O3","SiO2", "Mn", "P")]
compo$Rest = 100-rowSums(compo)
compo = acomp(compo)
pairsmap(data=clr(compo), loc=coords) # clr
pairsmap(data=compo, loc=coords) # closed data