plot.ordinDNA: Plot an 'ordinDNA' object

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Plots an ordination of the Principal Components Analysis conducted by ordinDNA.

Usage

1
2
3
4
## S3 method for class 'ordinDNA'
plot(x, majorAxes = c(1,2), plotCol = "default",  trans = "CC", 
    textcex = 0.7, pchCentroid = FALSE, sppBounds = "net", sppNames = TRUE, 
    namePos = "top", ptPch = 21, ptCex = 0.5, netWd = 1, ...)

Arguments

x

An object of class ‘ordinDNA’.

majorAxes

Numeric. Gives the numbers of the major axes that should be plotted. Default of the first two major axes (majorAxes = c(1,2))

plotCol

A vector of RGB colours giving the colours of the points and circles. Must be in the form of a character vector with elements "#XXXXXX" where XXXXXX gives the hexadecimal value for the colours desired. Default of "default". Colours are recycled if necessary.

trans

A character vector giving the hexadecimal value for the transparency of the circles. Default of "CC".

textcex

Numeric. Controls the size of the text giving the species value of the circles.

pchCentroid

Numeric. Controls the shape of the point showing the centroid of the circle for each species. Default of FALSE, no plotting of centroid position.

sppBounds

Option to determine the method of visualising conspecific points. Options of "net" (the default), "none" or "circles".

sppNames

Logical. Should species names be plotted? Default of TRUE.

namePos

Character vector of length 1 giving the position where the species names should be plotted. Possible values are: "top" and "bottom", anything else plots the names at the centroid.

ptPch

Numeric. Number of the symbol to be used for plotting. see points. Default of 21.

ptCex

Numeric. Number governing the size of the points. Default of 0.5.

netWd

Numeric. Number governing the width of the lines in the netowk. Default of 1.

...

Other arguments to be passed to plot.

Details

plot.ordinDNA calculates the centroid and radius of the most variable individual for each species in the multivariate space of the Principal Components Analysis object given.

majorAxes plots the axes in the form c(x, y). The maximum number of axes calculated is the number of specimens in the dataset minus one.

sppBounds has the following options: "net" (the default) creates a complete graph between all individuals within a species. If "circles" is specified, a circle is drawn with a center fixed on the centroid, and a radius of the length to the maximally distant individual. Selecting the option of "none" means the individuals are not connected in any way.

Value

Plots an ordination of the first two major axes showing the positions of each individual (squares), the centroid of each species (circular bullet and name of species), and the variation in the species (large circle, the radius of which is the distance to the furthest individual from the centroid).

Author(s)

Samuel Brown <s_d_j_brown@hotmail.com>

See Also

ordinDNA, cgraph.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
data(dolomedes)
doloDist <- dist.dna(dolomedes)
doloSpp <- substr(dimnames(dolomedes)[[1]], 1, 5)

doloOrd <- ordinDNA(doloDist, doloSpp)

plot(doloOrd)
plot(doloOrd, majorAxes = c(1,3))
plot(doloOrd, textcex = 0.001)
plot(doloOrd, plotCol = c("#FF0000", "#00FF00", "#0000FF"))
plot(doloOrd, namesPos = "bottom")
plot(doloOrd, namesPos = "centre")

data(anoteropsis)
anoDist <- dist.dna(anoteropsis)
anoSpp <- sapply(strsplit(dimnames(anoteropsis)[[1]], split="_"), 
    function(x) paste(x[1], x[2], sep="_"))
    
anoOrd <- ordinDNA(anoDist, anoSpp)

plot(anoOrd, sppBounds = "circles")

spider documentation built on May 2, 2019, 5:16 p.m.