| bertinplot {seriation} | R Documentation |
Plot a data matrix of cases and variables. Each value is represented by a symbol. Large values are highlighted. The matrix can be rearranged to make structure in the data visible (see Falguerolles et al 1997).
bertinplot(x, order = NULL, highlight = TRUE, options = NULL)
x |
a data matrix. Note that following Bertin,
columns are variables and rows are cases. This behavior can be
reversed using reverse = TRUE in options. |
order |
an object of class ser_permutation to rearrange x before
plotting. If NULL, no rearrangement is performed. |
highlight |
a logical scalar indicating whether to use highlighting.
If TRUE, all variables with values greater than the variable-wise
mean are highlighted. To control highlighting, also a
logical matrix with the same dimensions as x can be supplied. |
options |
a list with options for plotting. The
list can contain the following elements:
|
The plot is organized as a matrix of symbols. The symbols are drawn
by a panel function, where all symbols of a row are drawn
by one call of the function (using vectorization). The interface for the
panel function is panel.myfunction(value, spacing, hl).
value is the vector of values for a row scaled between 0 and 1,
spacing contains the relative space between symbols and
hl is a logical vector indicating which symbol should be highlighted.
de Falguerolles, A., Friedrich, F., Sawitzki, G. (1997): A Tribute to J. Bertin's Graphical Data Analysis. In: Proceedings of the SoftStat '97 (Advances in Statistical Software 6), 11–20.
ser_permutation,
seriate,
Package grid.
data("Irish")
scale_by_rank <- function(x) apply(x, 2, rank)
x <- scale_by_rank(Irish[,-6])
## use the the sum of absolute rank differences
order <- c(
seriate(dist(x, "minkowski", p = 1)),
seriate(dist(t(x), "minkowski", p = 1))
)
## plot
bertinplot(x, order)
## alternative display
bertinplot(x, order,
options = list(panel = panel.circles, spacing = -0.4))