pyramid: Pyramid diagram

View source: R/pyramid.R

Pyramid diagramR Documentation

Pyramid diagram

Description

Pyramid diagram.

Usage

pyramid(x, colour = "red", point_size = 4, face_alpha = 0.15)

Arguments

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).

Details

This is the pyramid that visualizes compositional data with 4 components in the 3D space.

Value

The pyramid plot.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Aitchison J. (1986). The statistical analysis of compositional data. Chapman & Hall.

See Also

ternary

Examples

x <- as.matrix(iris[, 1:4])
x <- x / rowSums(x)
pyramid(x)

Compositional documentation built on Dec. 4, 2025, 9:07 a.m.