hmLegend: Modify the d3heatmap legend

View source: R/hmLegend.R

hmLegendR Documentation

Modify the d3heatmap legend

Description

Provides options for modifying the legend for a d3heatmap object

Usage

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

## 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 Nov. 18, 2024, 9:20 a.m.