Learn R Programming

LSD (version 4.1-0)

align: Visualize two-dimensional data in a color encoded fashion

Description

Depict any matrix or list in a color encoded rectangular fashion.

Usage

align(
  input,
  colpal = "heat",
  simulate = FALSE,
  daltonize = FALSE,
  cvd = "p",
  alpha = NULL,
  label = FALSE,
  digits = 1,
  border = NULL,
  xlim = NULL,
  ylim = NULL,
  main = NULL,
  axes = TRUE,
  ...
)

Arguments

input

matrix or list with any type of entries.

colpal

a character vector containing R built-in color names or a name of a LSD colorpalette as a character string (see disco() or disco).

simulate

logical: if TRUE (FALSE by default), a converted colorpalette is used to simulate dichromat vision according to http://www.daltonize.org (see daltonize).

daltonize

logical: if TRUE (FALSE by default), a converted colorpalette is used to enhance dichromat vision according to http://www.daltonize.org (see daltonize).

cvd

character string implying the type of color vision deficiency ("p" for protanope, "d" for deuteranope or "t" for tritanope).

alpha

alpha value: a two-digit integer between 01 and 99 for color opacity, i.e. appearance of partial or full transparency (usage omitted by default).

label

logical: if TRUE (FALSE by default), labels are added according to the color scheme (i.e. binning).

digits

integer indicating the number of decimals to be used for binning of continuous data.

border

color for rectangle border(s). Use border = NA to omit borders.

xlim

x limits, standard graphics parameter.

ylim

y limits, standard graphics parameter.

main

title of the plot, standard graphics parameter.

axes

logical: if TRUE (by default), a box and axes are added to the plot (if FALSE, custom specification of axes can be achieved via basic R graphics functions).

...

additional parameters to be passed to points and plot.

See Also

clusterplot, demotour, disco, colorpalette

Examples

Run this code
# NOT RUN {
data(seqs)
colpal = c("A" = "darkgreen","C" = "darkblue","G" = "yellow","T" = "darkred")
align(seqs,colpal = colpal,label = TRUE,main = "DNA sequences")

data(homer)
colpal = c("white","black","yellow","wheat3")
align(homer,colpal = colpal,main = "D'OH!",asp = 1,axes = FALSE)
# }

Run the code above in your browser using DataLab