mdsplot: Plot Classical Multidimensional Scaling

Description Usage Arguments Value Author(s) See Also Examples

View source: R/mt_util.R

Description

Plot metric MDS with categorical information.

Usage

1
mdsplot(x, y, method = "euclidean", dimen = c(1,2), ...)

Arguments

x

A matrix or data frame to be plotted.

y

A factor or vector giving group information of columns of x.

method

The distance measure to be used. This must be one of "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski". Any unambiguous substring can be given. It is only for mds.plot.wrap.

dimen

A vector of index of dimentonal to be plotted. Only two dimentions are are allowed.

...

Further arguments to prcomp or lattice. See corresponding entry in xyplot for non-trivial details of lattice. For pcaplot, one argument is ep: an integer for plotting 95% ellipse. 1 and 2 for plotting overall and group ellipse, respectively. Otherwise, none. For details, see panel.elli.1.

Value

mdsplot returns an object of class "trellis".

Author(s)

Wanchang Lin

See Also

grpplot, panel.elli, mds.plot.wrap, pcaplot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## examples of 'mdsplot'

data(iris)
x <- iris[,1:4]
y <- iris[,5]
mdsplot(x,y, dimen=c(1,2),ep=2)
mdsplot(x,y, dimen=c(2,1),ep=1)

tmp <- mdsplot(x,y, ep=2, conf.level = 0.9)
tmp

## change symbol's color, type and size
mdsplot(x, y, main="IRIS DATA", cex=1.2,
  auto.key=list(space="right", col=c("black","blue","red"), cex=1.2),
  par.settings = list(superpose.symbol = list(col=c("black","blue","red"),
                                              pch=c(1:3))))

mt documentation built on Feb. 2, 2022, 1:07 a.m.

Related to mdsplot in mt...