trianglegram: Draw a color-coded triangular matrix

Description Usage Arguments Details Value See Also Examples

View source: R/distogram.R

Description

This function is called by distogram, and probably isn't very useful by itself.

Usage

1
2
3
trianglegram(x, labels = rownames(x), 
    lower = TRUE, diag = FALSE, right = FALSE, 
    add = FALSE, xpos = 0, ypos = 0, xlim, ylim, ...)

Arguments

x

A square matrix containing color values.

labels

Labels.

lower

If TRUE, use lower.tri, else use upper.tri.

diag

Include the diagonal elements of x?

right

Should triangle point to the right or left?

add

Add to an existing plot?

xpos, ypos

Location of bottom point of the triangle.

xlim, ylim

Plotting limits.

...

Further arguments passed to plot.

Details

The input must be a (square) matrix; however, only part of the matrix (the upper or lower triangle) is displayed.

Value

none.

See Also

distogram, corrogram

Examples

1
2
3
4
5
6
 
  m <- matrix(jet(40), nrow = 20, ncol = 20)
  trianglegram(m)

  ## just for fun
  trianglegram(m, labels = NA, right = TRUE, add = TRUE, xpos = 1)

squash documentation built on Feb. 20, 2020, 9:08 a.m.