distogram {squash} | R Documentation |
Draw a color-coded triangular distance matrix
Description
This function draws a color-coded, rotated triangular matrix indicating the "distance" between every pair of items.
Usage
distogram(x, map,
n = 10, base = NA, colFn = heat,
key = TRUE, title = NA, ...)
Arguments
x |
A |
map |
A color map, as generated by |
n , base , colFn |
Arguments passed to |
key |
Add a color key? |
title |
Title for the color key. |
... |
Further arguments passed to |
Details
If the input x
is a matrix, the lower triangle is extracted by default (but see the arguments for trianglegram
).
Value
The color map, invisibly.
See Also
Examples
## Distances between European cities
distogram(eurodist, title = 'Distance (km)')
## Some variations
map <- distogram(eurodist, key = FALSE, colFn = jet, right = TRUE)
vkey(map, title = 'Distance (km)', x = -8)
[Package squash version 1.0.9 Index]