View source: R/xplot_heatmap.R
| xplot_heatmap | R Documentation |
Following the xpose design pattern, this is a generic template
(analogous to xplot_boxplot() or xplot_pairs()) for rendering a
numeric matrix as a themed tile heatmap with cell value labels. It is not
tied to any particular data source; callers are expected to build a named
implementation on top of it (eg, cormat() for parameter
correlation/covariance matrices) rather than calling it directly for
everyday use.
xplot_heatmap(
xpdb,
mat,
digits = 3,
limits = NULL,
midpoint = 0,
legend_name = "Value",
title = NULL,
subtitle = NULL,
caption = NULL,
tag = NULL,
plot_name = "heatmap",
gg_theme,
xp_theme,
quiet,
...
)
xpdb |
< |
mat |
A numeric matrix with row and column names. |
digits |
Number of significant digits to display in cell labels |
limits |
Fill scale limits, as |
midpoint |
Fill scale midpoint |
legend_name |
Fill scale/legend title |
title |
Plot title |
subtitle |
Plot subtitle |
caption |
Plot caption |
tag |
Plot tag |
plot_name |
Metadata name of plot |
gg_theme |
As in |
xp_theme |
As in |
quiet |
Silence extra debugging output |
... |
Additional aesthetics, passed to the |
The desired plot
m <- matrix(c(1, 0.5, 0.5, 1), nrow = 2, dimnames = list(c("A", "B"), c("A", "B")))
xplot_heatmap(xpdb_x, m, quiet = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.