Plots the coordinates of a multidimensional scaling analysis as an X-Y scatter plot or `map' and, if x$classical = FALSE, a Shepard plot.
# S3 method for MDS
plot(
x,
nnlines = FALSE,
pch = NA,
pos = NULL,
cex = 1,
col = "black",
bg = "white",
oma = rep(1, 4),
mar = rep(2, 4),
mgp = c(2, 1, 0),
xpd = NA,
Shepard = 2,
...
)
an object of class MDS
if TRUE, draws nearest neighbour lines
plot character (see ?plot for details). May be a vector.
position of the sample labels relative to the plot
symbols if pch != NA
relative size of plot symbols (see ?par
for
details)
plot colour (may be a vector)
background colour (may be a vector)
A vector of the form c(bottom, left, top, right)
giving the size of the outer margins in lines of text.
A numerical vector of the form c(bottom, left,
top, right)
that gives the number of lines of margin to be
specified on the four sides of the plot.
The margin line (in mex
units) for the axis
title, axis labels and axis line. See ?par
for further
details.
A logical value or NA
. See ?par
for
further details.
either:
0
: only plot the MDS configuration, do not show the Shepard plot
1
: only show the Shepard plot, do not plot the MDS configuration
2
: show both the MDS configuration and Shepard plot in separate
windows
optional arguments to the generic plot
function
MDS
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