plot.MDS: Plot an MDS configuration

View source: R/plot.R

plot.MDSR Documentation

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

## 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,
  Shepard = 2,
  ...
)

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.

Shepard

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

See Also

MDS

Examples

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)

provenance documentation built on May 29, 2024, 4:23 a.m.