Two- or three-dimensional scatterplots showing the loadings from an analysis of data blocks containing shape information

loadingsPlot(result, comp = 1, cex.2d = 2, cex.3d = 5)

Arguments

result

result produced by the analyseBlocks function.

comp

the component selected to be shown in the loadings plots. Default is component 1. The selected component must be within the range of components calculated by analyseBlocks.

cex.2d

value for specifying point size when plotting loadings from analysis of two-dimensional shape configurations. Passed to cex term of plot. Default is 2.

cex.3d

value for specifying point size when plotting loadings from analysis of three-dimensional shape configurations. Passed to cex term of plot3d. Default is 5.

Value

a two- or three-dimensional scatterplot

Details

loadingsPlot helps to visualise the result from the analyseBlocks function by using the component loadings to colour the mean position of each point in the consensus space (for option = "rcpca" in analyseBlocks) or the concatenated superblock (for option = "pca" in analyseBlocks). Points are coloured along a gradient from orange to blue. Points that are more orange have relatively large loadings values (i.e. larger within-block covariation), and points that are more blue have relatively small loadings values (i.e. smaller within-block covariation). loadingsPlot will present a two-dimensional scatterplot if the list of data blocks that were analysed had k = 2 dimensions. Likewise, loadingsPlot will present a three-dimensional scatterplot if the list of data blocks had k = 3 dimensions. Data from the individual blocks that contributed to either the consensus space or concatenated superblock are shown as separate scatterplots for visual clarity. Separate plots are produced because the points in each block have the same origin after Procrustes transformation and would plot on top of one another if they were presented along the same set of Cartesian axes. loadingsPlot uses the arrayspecs and mshape functions from the geomorph package (Adams and Otárola-Castillo 2013).

References

Adams DC, Otárola-Castillo E. 2013. geomorph: an R package for the collection and analysis of geometric morphometric shape data. Methods in Ecology and Evolution 4:393–399 https://doi.org/10.1111/2041-210X.12035

Examples

block1 <- dodecBlock() block2 <- dodecBlock() blocklist <- combineBlocks(blocks = c(block1, block2)) result1 <- analyseBlocks(blocklist) result2 <- analyseBlocks(blocklist, option = "pca", ncomp = 10) loadingsPlot(result1) loadingsPlot(result2, comp = 2)