spmplot {fsdaR} | R Documentation |
Interactive scatterplot matrix
Description
Produces an interactive scatterplot matrix with boxplots or histograms on the main diagonal and possibly robust bivariate contours
Usage
spmplot(
X,
group,
plot,
variables,
col,
cex,
pch,
labeladd,
label,
legend,
dispopt = c("hist", "box"),
tag,
datatooltip,
databrush,
trace = FALSE,
...
)
Arguments
X |
data matrix (2D array) containing |
group |
grouping variable. Vector with |
plot |
controls the names which are displayed in the margins of the
scatter-plot matrix, the labels of the legend the colors and the symbols.
If
|
variables |
a character string with the names of the variables |
col |
color specification for the data point. Can be different for each group. By default, the order of the colors is blue, red, black, magenta, green, cyan and yelow. |
cex |
the size of the symbols used for plotting. By default |
pch |
specification of the symbols to use. For example, if
there are three groups, and |
labeladd |
logical, controls wheather the elements belonging to the last group
in the scatterplot matrix are labelled with their unit row index
or their rowname. The rowname is taken from the parameter |
label |
a character vector of length |
legend |
logical, controls where a legend is shown or not. |
dispopt |
controls how to fill the diagonals in the plot (main diagonal of
the scatter plot matrix). Set |
tag |
Plot handle. String which identifies the handle of the plot which is about to be created.
The default is |
datatooltip |
If datatooltip is not empty the user can use the mouse in order to have
information about the unit selected, the step in which the unit enters the search and
the associated label. If datatooltip is a list, it is possible to control the aspect
of the data cursor (see MATLAB function |
databrush |
Interactive mouse brushing. If databrush is missing or empty (default), no brushing is done. The activation of this option (databrush is TRUE or a list) enables the user to select a set of trajectories in the current plot and to see them highlighted in the scatterplot matrix. If the scatterplot matrix does not exist it is automatically created. In addition, brushed units can be highlighted in the monitoring MD plot. Note that the window style of the other figures is set equal to that which contains the monitoring residual plot. In other words, if the monitoring residual plot is docked all the other figures will be docked too. If If
|
trace |
Whether to print intermediate results. Default is |
... |
potential further arguments passed to lower level functions. |
Value
none
Author(s)
FSDA team, valentin.todorov@chello.at
Examples
## Not run:
## Call of spmplot() without optional parameters.
## Iris data: scatter plot matrix with univariate boxplots on the main
## diagonal.
X <- iris[,1:4]
group <- iris[,5]
spmplot(X, group, variables=c('SL','SW','PL','PW'), dispopt="box")
## Example of spmplot() called by routine fsmult().
## Generate contaminated data.
n <- 200; p <- 3
X <- matrix(rnorm(n*p), ncol=3)
Xcont <- X
Xcont[1:5,] <- Xcont[1:5,] + 3
## spmplot is called automatically by all outlier detection methods, e.g. fsmult()
out <- fsmult(Xcont, plot=TRUE);
## Now test the direct use of fsmult(). Set two groups, e.g. those obtained
## from fsmult().
group = rep(0, n)
group[out$outliers] <- 1
## option 'labeladd' is used to label the outliers
## By default, the legend identifies the groups with the identifiers
## given in vector 'group'.
## Set the colors for the two groups to blue and red.
spmplot(Xcont, group, col=c("blue", "red"), labeladd=1, dispopt="box")
## End(Not run)