plot.MDS: Plot an MDS configuration

Description Usage Arguments See Also Examples

View source: R/plot.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## S3 method for class '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,
  ...
)

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)

oma

A vector of the form c(bottom, left, top, right) giving the size of the outer margins in lines of text.

mar

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.

mgp

The margin line (in mex units) for the axis title, axis labels and axis line. See ?par for further details.

xpd

A logical value or NA. See ?par for further details.

...

optional arguments to the generic plot function

See Also

MDS

Examples

1
2
3
4
5
6
7
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)

Example output

initial  value 10.608343 
iter   5 value 8.868203
iter   5 value 8.867183
iter  10 value 7.883745
iter  15 value 7.637849
final  value 7.619237 
converged

provenance documentation built on May 5, 2021, 1:06 a.m.