plot_heatmap | R Documentation |
Creates a heatmap plot from a matrix or data frame.
plot_heatmap(data, cell_width = 1, cell_height = 1, ...)
data |
A matrix or data frame to be visualized as a heatmap. The row names and column names of the data will be used for labeling the heatmap axes. |
cell_width |
Numeric value indicating the width of each cell in the heatmap. Default is 1. |
cell_height |
Numeric value indicating the height of each cell in the heatmap. Default is 1. |
... |
Additional arguments to be passed to ggplot2 functions. |
A ggplot2 object representing the heatmap.
# Example data
data <- matrix(rnorm(100), nrow = 10, ncol = 10)
rownames(data) <- paste0("Row", 1:10)
colnames(data) <- paste0("Col", 1:10)
# Plot heatmap
plot <- plot_heatmap(data)
print(plot)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.