msdplot: Visualize two-dimensional data clusters

Description Usage Arguments Author(s) See Also Examples

View source: R/LSD.msdplot.r

Description

Depict a numeric matrix or list utilizing the underlying mean and standard deviation estimates of one dimension in a color encoded fashion.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
msdplot(
  input,
  label = NULL,
  at = NULL,
  xlim = NULL,
  ylim = NULL,
  xlab = "",
  ylab = "",
  main = "msdplot",
  xaxt = "s",
  xlabels = NULL,
  las = 1,
  separate = TRUE,
  size = TRUE,
  col = "darkgreen",
  bars = TRUE,
  alpha = 50,
  ...
)

Arguments

input

matrix or list with numerical entries, quantiles of cols will define lines.

label

a character vector assigning rows/elements of 'input' to clusters (if specified, multiple clusters can be depicted in different colors and/or subsequent plots).

at

a integer vector containing the x-positions corresponding to the columns of 'input'.

xlim

x limits, standard graphics parameter.

ylim

y limits, standard graphics parameter.

xlab

x labels, standard graphics parameter.

ylab

y labels, standard graphics parameter.

main

title(s) of the plot, standard graphics parameter.

xaxt

a character which specifies the x axis type ("n" suppresses plotting of the axis).

xlabels

a character vector containing labels for the x-axis.

las

las=1: horizontal text, las=2: vertical text (x-axis labels).

separate

if TRUE (by default), different clusters are depicted in subsequent plots.

size

logical: if TRUE (by default), the size of each cluster is added to the title of the respective plot.

col

a character vector giving R build-in colors for different clusters.

bars

logical: if TRUE (by default), error bars are added at each position.

alpha

alpha value: a two-digit integer between 01 and 99 for color opacity, i.e. appearance of partial or full transparency (usage omitted by default).

...

additional parameters to be passed to points and plot.

Author(s)

Bjoern Schwalb

See Also

comparisonplot, demotour, disco, colorpalette

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
at = c(2,4,8,16,32)
clus = matrix(rnorm(500,sd=0.5),ncol=5)
batch = sample(c(-8,-6,-4,-2),100,replace=TRUE)
clus = clus + cbind(0,0.25*batch,0.5*batch,0.75*batch,batch)
clus = clus - clus[,1]
clus = t(t(clus)*c(0,0.1,0.25,0.5,1))
labs = paste("cluster",kmeans(clus,4)$cluster)

colpal = c("darkgreen","darkblue","darkred","black")
msdplot(clus,labs,at,separate=FALSE,col=colpal,alpha=25,xlabels=at)

msdplot(clus,labs,at,col=colpal,alpha=50,xlabels=at)

Example output



LSD documentation built on July 2, 2020, 4:14 a.m.

Related to msdplot in LSD...