hmLegend: Modify the d3heatmap legend

Description Usage Arguments Value Source See Also Examples

View source: R/hmLegend.R

Description

Provides options for modifying the legend for a d3heatmap object

Usage

1
2
3
4
5
6
7
8
9
hmLegend(
  d3heatmap,
  show = TRUE,
  size,
  title,
  location = c("fl", "br", "tr", "tl", "bl"),
  density = c("histogram", "none"),
  density.fill = NULL
)

Arguments

d3heatmap

Required A valid d3heatmap object

show

Required, logical Show color key and density information? TRUE/FALSE. Defaults to FALSE

size

numeric value indicating the relative size of the key. Will multiple the row and column axis sizes. Defaults to 1

title

Optional, character Separate title for color key (legend). Defaults to NULL.

location

Required, character Location for legend (color key), either "fl", "br", "tr", "tl", or "bl" for "float", "bottom right", "top right", "top left", and "bottom left". Defaults to "fl", which follows the location of the axis labels.

density

Optional, character indicating whether to superimpose a 'histogram' or no plot ('none') on the color-key (legend).

density.fill

Optional, character giving the color for the density display specified by 'density', defaults to NULL which will fill the bars with the same color as the bin

Value

Modified d3heatmap object

Source

The interface was inspired by dygraphs

See Also

heatmap, heatmap.2

Examples

1
2
3
4
5
6
7
## Not run: 

d3heatmap(mtcars, dendrogram = 'none', scale = 'column', srtCol = 30) %>% 
  hmLegend(show = TRUE, title = "Title", location = "tl") 
  

## End(Not run)

rstudio/d3heatmap documentation built on May 26, 2021, 10:16 p.m.