hmAxis | R Documentation |
Provides options for modifying the x and y axes of a D3 Heatmap widget
hmAxis(
d3heatmap,
axis = c("x", "y", "row", "column"),
size,
labels,
font.size,
angle,
location,
title,
title.font.size
)
d3heatmap |
a d3heatmap object created from the d3heatmap() |
axis |
Name of the axis to modify; either "x", "y", "row", or "column" |
size |
Size of axes, in pixels. |
labels |
character vectors with axis labels to use (top to bottom for y axis, left to right for x); default to rownames(x) or colnames(x). |
font.size |
integer Font size of axis labels, in pixels (i.e., will be translated to a character string with 'px' appended) |
angle |
Angle of x axis labels (x axis only). Defaults to 60. Maximum of 90 (vertical), minimum of 25. |
location |
Location of the axis, either "bottom" or "top" for the x axis, and either "right" or "left" for the y axis. Defaults to "bottom" and "right". |
title |
Title text |
title.font.size |
Font size of axis title in pixels. Defaults to 14. |
Modified d3heatmap object
The interface was inspired by dygraphs
heatmap, heatmap.2
## Not run:
d3heatmap(mtcars, scale = "column", col = "Blues") %>%
hmAxis("x", angle = 30, title = "test", location = 'top', font.size = '24px') %>%
hmAxis("y", title = "test", location = 'right')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.