msdplot {LSD} | R Documentation |
Visualize two-dimensional data clusters
Description
Depict a numeric matrix or list utilizing the underlying mean and standard deviation estimates of one dimension in a color encoded fashion.
Usage
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 |
size |
logical: if |
col |
a character vector giving R build-in colors for different clusters. |
bars |
logical: if |
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
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)