| Pyramid diagram | R Documentation |
Pyramid diagram.
pyramid(x, colour = "red", point_size = 4, face_alpha = 0.15)
x |
A matrix with the compositional data. |
colour |
If you want the points to appear in different colour put a vector with the colour numbers or colours. |
point_size |
The size of the plotted points. Note that the points appear as boxes. |
face_alpha |
This controls the transparency of the tetrahedron faces: When face_alpha= 0, this is completely transparent (invisible faces). When face_alpha=1, this is completely opaque (solid faces). When face_alpha = 0.15 (the default value) it is very transparent (you can see through the faces easily). |
This is the pyramid that visualizes compositional data with 4 components in the 3D space.
The pyramid plot.
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
Aitchison J. (1986). The statistical analysis of compositional data. Chapman & Hall.
ternary
x <- as.matrix(iris[, 1:4])
x <- x / rowSums(x)
pyramid(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.