Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

trigrid

Barycentric plots


Description

Function to add a grid to an existing (barycentric) plot.

Usage

trigrid(x = seq(0.1, 0.9, by = 0.1), y = NULL, z = NULL, 
    lty = "dashed", col = "grey", ...)

Arguments

x

Values along which to draw grid lines for first dimension (or all dimensions if y and z omitted). For NO grid lines in some dimensions just supply an NA.

y

Grid lines for second dimension.

z

Grid lines for third dimension.

lty

Line type (see par).

col

Line colour (see par).

...

Further graphical parameters passed to trilines.

Details

Grid lines illustrate the set of points for which one of the dimensions is held constant; e.g. horizontal lines contain all points with a certain value y for the second dimension, connecting the two extreme points (0,y,1-y) and (1-y,y,0).

Grids may be designed more flexible than with triplot's grid option.

Author(s)

See Also

Examples

triplot(grid = FALSE)
trigrid(c(1/3, 0.5)) # same grid for all 3 dimensions 

triplot(grid = c(1/3, 0.5))  # (same effect) 

triplot(grid = FALSE)
# different grids for all dimensions:
trigrid(x = 1/3, y = 0.5, z = seq(0.2, 0.8, by=0.2))  

triplot(grid = FALSE)
# grid for third dimension only:
trigrid(x = NA, y = NA, z = c(0.1, 0.2, 0.4, 0.8))

klaR

Classification and Visualization

v0.6-15
GPL-2 | GPL-3
Authors
Christian Roever, Nils Raabe, Karsten Luebke, Uwe Ligges, Gero Szepannek, Marc Zentgraf, David Meyer
Initial release
2020-02-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.