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

Description Usage Arguments Author(s) See Also Examples

View source: R/LSD.align.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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.

Author(s)

Phillipp Torkler, Bjoern Schwalb

See Also

clusterplot, demotour, disco, colorpalette

Examples

1
2
3
4
5
6
7
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)

Example output

4 color encoding 
4 color encoding 

LSD documentation built on July 2, 2020, 4:14 a.m.

Related to align in LSD...