clusterPlotSOMmap: Plot self-organising map

Description Usage Arguments Details Value Author(s) Examples

View source: R/1006-clusterPlotSOMmap.R

Description

Plot self-organising map

Usage

1
2
clusterPlotSOMmap(x, index = NULL, main = NULL, label = NULL, pchs = 46,
  bgcol = NULL, cols = "red", lwds = 2, keepMargins = FALSE, ...)

Arguments

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 FALSE (the default), restore the original graphical parameters after plotting the kohonen map. If TRUE, one retains the map coordinate system so that one can add symbols to the plot, or map unit numbers using the identify function.

...

other graphical parameters.

Details

Plot self-organising map, obtained from function kohonen. shows where objects are mapped. It needs the classif argument, and a labels or pchs argument.

Value

plot mapping

Author(s)

Min-feng Zhu <wind2zhu@163.com>,

Examples

 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)

wind22zhu/BioMedR documentation built on Oct. 21, 2019, 12:51 p.m.