matrix_heatmap | R Documentation |
Creates a heatmap based on a matrix of values.
matrix_heatmap( data, digits = 2, text_size = 4.5, legend_height = 20, row_ids = NULL, col_ids = NULL, add_border = F, border_color = "black", border_size = 1, border_cutoff = 0, border_cutoff_invert = F, ggfill = scale_fill_gradient2(name = "", low = "steelblue4", mid = "white", high = "red4", breaks = seq(-1, 1, 0.1), limits = c(-1, 1)), reorder_matrix = T, title = NULL, x_title = NULL, y_title = NULL, xlab_pos = c("bottom", "top"), ylab_pos = c("left", "right") )
data |
A data frame or matrix of numeric values. |
digits |
An integer for how many digits to which to round cell values. |
text_size |
A numeric value for the cell value text size. |
legend_height |
A numeric for the height of the legend key in millimeters. |
row_ids |
An optional string vector of row names to retain for plotting. |
col_ids |
An optional string vector of column names to retain for plotting. |
add_border |
A boolean for whether certain cells be annotated with a specific border color
based on |
border_color |
A string for the cell border color. Only applies if |
border_size |
A numeric for the cell border thickness. Only applies if |
border_cutoff |
A numeric for the cutoff to use when determining which cells to annotate
with |
border_cutoff_invert |
A boolean for whether to select cells with a value greater than the
specified value of |
ggfill |
An object returned by the family of |
reorder_matrix |
A boolean indicating if the columns and rows should be reordered such that the diagonal cells equate to the same x and y axis labels. |
title |
A string for the plot title. |
x_title |
A string for the x-axis title. |
y_title |
A string for the y-axis title. |
xlab_pos |
The x-axis label position. One of "top", "bottom". |
ylab_pos |
The y-axis label position. One of "left", "right". |
A ggplot2 object
assoc_matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.