plot3Dpoints {MorphoTools2}R Documentation

The Default Scatterplot 3D Function

Description

A generic function for plotting ordination scores stored in pcadata, pcoadata, nmdsdata, and cdadata objects.

Usage

plot3Dpoints(result, axes = c(1,2,3), xlab = NULL, ylab = NULL, zlab = NULL,
  pch = 16, col = "black", pt.bg = "white", phi = 10, theta = 2,
  ticktype = "detailed", bty = "u", type = "p", labels = FALSE,
 legend = FALSE, legend.pos = "topright", ncol = 1, ...)

Arguments

result

an object of class pcadata, pcoadata, nmdsdata, or cdadata.

axes

x, y, z axes of plot.

xlab, ylab, zlab

a title of the respective axes.

pch

a vector of plotting characters or symbols, see points.

col

the colours for points. Multiple colours can be specified so that each taxon can be given its own colour. If there are fewer colours than taxa, they are recycled in the standard fashion.

pt.bg

the background colours for points. Multiple colours can be specified, as above.

theta, phi

the angles defining the viewing direction. Theta gives the azimuthal direction and phi the colatitude, see persp.

ticktype

character: "simple" draws just an arrow parallel to the axis to indicate direction of increase; "detailed" draws normal ticks as per 2D plots.

bty

the type of the box. One of "g", "b2", "bl", "f", "u" can be specified.

type

the type of plot points, "p" for points, or "h" for vertical spikes.

labels

logical, if TRUE, point's labels are displayed.

legend

logical, if TRUE, legend is displayed. Only restricted number of legend parameters are supported. For more precise legend plotting, use plotAddLegend directly.

legend.pos

a single keyword from the list "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right", and "center", to be used to position the legend.

ncol

the number of columns in which to set the legend items.

...

further arguments to be passed to plot3D, persp, par.

Value

None. Used for its side effect of producing a plot.

Examples

data(centaurea)
centaurea = naMeanSubst(centaurea)
centaurea = removePopulation(centaurea, populationName = c("LIP", "PREL"))

pcaRes = pca.calc(centaurea)

plot3Dpoints(pcaRes, col = c("red", "green", "blue", "black"), pch = c(20,17,8,21),
                 pt.bg = "orange")

[Package MorphoTools2 version 1.0.1.1 Index]