Learn R Programming

provenance (version 1.5)

plot.MDS: Plot an MDS configuration

Description

Plots the coordinates of a multidimensional scaling analysis as an X-Y scatter plot or 'map' and, if x$classical = FALSE, a Shepard plot.

Usage

"plot"(x, nnlines = FALSE, pch = NA, pos = NULL, cex = 1, col = "black", bg = "white", xlab = "", ylab = "", xaxt = "n", yaxt = "n", ...)

Arguments

x
an object of class MDS
nnlines
if TRUE, draws nearest neighbour lines
pch
plot character (see ?plot for details). May be a vector.
pos
position of the sample labels relative to the plot symbols if pch != NA
cex
relative size of plot symbols (see ?par for details)
col
plot colour (may be a vector)
bg
background colour (may be a vector)
xlab
a string with the label of the x axis
ylab
a string with the label of the y axis
xaxt
if = 's', adds ticks to the x axis
yaxt
if = 's', adds ticks to the y axis
...
optional arguments to the generic plot function

See Also

MDS

Examples

Run this code
data(Namib)
mds <- MDS(Namib$DZ)
coast <- c('N1','N2','N3','N10','N11','N12','T8','T13')
snames <- names(Namib$DZ)
bgcol <- rep('yellow',length(snames))
bgcol[which(snames %in% coast)] <- 'red'
plot(mds,pch=21,bg=bgcol)

Run the code above in your browser using DataLab