trianglegram {squash}R Documentation

Draw a color-coded triangular matrix

Description

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

Usage

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

 
  m <- matrix(jet(40), nrow = 20, ncol = 20)
  trianglegram(m)

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

[Package squash version 1.0.9 Index]