plotAddSpiders {MorphoTools2} | R Documentation |
Add Spiders to a Plot
Description
This function connects taxa's points with its centroids, thus forms a “spider” diagram.
Usage
plotAddSpiders(result, axes = c(1,2), col = "black", lty = 1, lwd = 1, ...)
Arguments
result |
result of |
axes |
x, y axes of plot. |
col |
the colours for labels. |
lty |
the line type. Line types can either be specified as one of following types: 0=blank, 1=solid (default), 2=dashed, 3=dotted, 4=dotdash, 5=longdash, 6=twodash. |
lwd |
the line width. |
... |
further arguments to be passed to |
Value
None. Used for its side effect of adding elements to a plot.
Examples
data(centaurea)
centaurea = naMeanSubst(centaurea)
centaurea = removePopulation(centaurea, populationName = c("LIP", "PREL"))
pcaRes = pca.calc(centaurea)
plotPoints(pcaRes, col = c(rgb(255, 0, 0, max = 255, alpha = 150), # red
rgb(0, 255, 0, max = 255, alpha = 150), # green
rgb(0, 0, 255, max = 255, alpha = 150), # blue
rgb(0, 0, 0, max = 255, alpha = 150)), # black
legend = FALSE, xlim = c(-5, 7.5), ylim = c(-5, 5.5))
plotAddLegend(pcaRes, col = c("red", "green", "blue", "black"), ncol = 2)
plotAddSpiders(pcaRes, col = c("red", "green", "blue", "black"))
plotPoints(pcaRes, col = c("red", "green", "blue","black"), legend = TRUE, cex = 0.4)
plotAddSpiders(pcaRes, col = c(rgb(255, 0, 0, max = 255, alpha = 150), # red
rgb(0, 255, 0, max = 255, alpha = 150), # green
rgb(0, 0, 255, max = 255, alpha = 150), # blue
rgb(0, 0, 0, max = 255, alpha = 150))) # black
[Package MorphoTools2 version 1.0.1.1 Index]