3D interactive plot of the results of a PCoA ordination
This script takes output from the ordination undertaken using gl.pcoa() and plots the individuals in 3D space. The visualisation can be rotated, zoomed in and zoomed out with the mouse to examine the structure.
gl.pcoa.plot.3d( glPca, x, xaxis = 1, yaxis = 2, zaxis = 3, radius = 8, verbose = NULL )
glPca |
– name of the glPca object containing the factor scores and eigenvalues [required] |
x |
– name of the genlight object or fd object from which the PCoA was generated [required] |
xaxis |
– identify the x axis from those available in the ordination (xaxis <= nfactors) [default 1] |
yaxis |
– identify the y axis from those available in the ordination (yaxis <= nfactors) [default 2] |
zaxis |
– identify the z axis from those available in the ordination (zaxis <= nfactors) [default 3] |
radius |
– size of the points [default 8] |
verbose |
– verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log ; 3, progress and results summary; 5, full report [default 2 or as specified using gl.set.verbosity] |
The factor scores are taken from the output of gl.pcoa(), an object of class glPca, and the population assignments from the original data file and plots the specimens in a 3D plot.
Axes can be specified from the ordination, provided they are within the range of the nfactors value provided to gl.pcoa().
NULL, plots an interactive 3D plot of the ordination in a separate window
Arthur Georges (Post to https://groups.google.com/d/forum/dartr)
pcoa <- gl.pcoa(possums.gl, nfactor=5) gl.pcoa.plot.3d(pcoa, possums.gl, xaxis=1, yaxis=2, zaxis=3)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.