trigrid: Barycentric plots In klaR: Classification and visualization

Description

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

Usage

 ```1 2``` ```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)

Christian Röver, [email protected]

`triplot`, `trilines`, `triframe`, `centerlines`

Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12``` ```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)) ```

Example output

```Loading required package: MASS
```

klaR documentation built on May 31, 2017, 1:53 a.m.