powered by
A table in html or Latex showing values associated with colours
legendTable(x, type=c('latex', 'html'), box = c(-0.2, 1, 2), unit = 'em', collapse=NULL)
data.frame or character vector
data.frame
a data.frame with columns col and label, possibly produced by colourScale
col
label
colourScale
html or latex compatible output
dimensions of colour boxes, passed as depth, height and width to rule in Latex, or width (first two elements ignored) for html.
rule
Units for box dimensions
If non-NULL, passed to paste to produce a character vector instead of table
paste
mytable = data.frame(col=col2html(1:5), label=1:5) legendTable(mytable) legendTable(mytable, collapse=';') legendTable(mytable, type='html')
Run the code above in your browser using DataLab