Description Usage Arguments Details Value Author(s) Examples
View source: R/1006-clusterPlotSOMmap.R
Plot self-organising map
1 2 |
x |
Kohonen object. |
index |
The location of the user's objective data |
main |
Title of the plot. |
label |
Labels to plot. |
pchs |
Symbols to plot. |
bgcol |
Optional argument to colour the unit backgrounds for the "mapping" and "codes" plotting type. Defaults to "gray" and "transparent" in both types, respectively. |
cols |
A specification for the default number color. |
lwds |
The number width, a positive number, defaulting to 1. |
keepMargins |
If |
... |
other graphical parameters. |
Plot self-organising map, obtained from function kohonen. shows where objects
are mapped. It needs the classif
argument, and a labels
or
pchs
argument.
plot mapping
Min-feng Zhu <wind2zhu@163.com>,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | data(som.bcl)
clusterPlotSOMmap(som.bcl, pchs = 1)
idx = unique(som.bcl$unit.classif[1:80])
bgcols <- c("gray", "lightgreen")
index = rep(1, 5 * 5)
index[idx] = 2
bgcol = bgcols[as.integer(index)]
label = c()
for (i in 1:length(idx)) {
label[i] = length(which(som.bcl$unit.classif[1:80] == idx[i]))
}
clusterPlotSOMmap(som.bcl, index = idx, label = label, bgcol = bgcol)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.