mdsplot {mt} | R Documentation |
Plot Classical Multidimensional Scaling
Description
Plot metric MDS with categorical information.
Usage
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 |
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 |
dimen |
A vector of index of dimentonal to be plotted. Only two dimentions are are allowed. |
... |
Further arguments to |
Value
mdsplot
returns an object of class "trellis"
.
Author(s)
Wanchang Lin
See Also
grpplot
, panel.elli
, mds_plot_wrap
,
pcaplot
Examples
## 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))))