hmOptions: Modify d3heatmap options

View source: R/hmOptions.R

hmOptionsR Documentation

Modify d3heatmap options

Description

Change options for a d3heatmap

Usage

hmOptions(
  d3heatmap,
  title,
  scale = c("none", "row", "column"),
  scale.by.range,
  na.rm,
  na.value,
  show.grid,
  animation.duration,
  reverse.columns
)

Arguments

d3heatmap

a d3heatmap object created from the d3heatmap()

title

string Plot title. Defaults to NULL.

scale

character indicating if the values should be centered and scaled in either the row direction or the column direction, or none. The default is "none".

scale.by.range

logical indicating whether to scale rows or columns by the range of each row and column. Setting this parameter to TRUE automatically sets na.rm to TRUE

na.rm

logical indicating whether NA's should be removed.

na.value

numeric indicating where NA's should be substituted to trigger the NA color.

show.grid

TRUE to show gridlines, FALSE to hide them, or a numeric value to specify the gridline thickness in pixels (can be a non-integer).

animation.duration

Number of milliseconds to animate zooming in and out. For large x it may help performance to set this value to 0.

reverse.columns

logical indicating if the column order should be reversed for plotting. Default (when missing) - is FALSE, unless symmetrical is TRUE... useful for correlation matrices.

Value

Modified d3heatmap object

Source

The interface was inspired by dygraphs

See Also

heatmap, heatmap.2

Examples

## Not run: 

d3heatmap(mtcars, scale = "column", col = "Blues") %>%
  hmOptions(scale.by.range = TRUE, show.grid = FALSE,
 		animation.duration = 400)


## End(Not run)


rstudio/d3heatmap documentation built on Nov. 18, 2024, 9:20 a.m.