powered by
Creates a heatmap plot from a matrix or data frame.
plot_heatmap(data, cell_width = 1, cell_height = 1, ...)
A ggplot2 object representing the heatmap.
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.
Numeric value indicating the width of each cell in the heatmap. Default is 1.
Numeric value indicating the height of each cell in the heatmap. Default is 1.
Additional arguments to be passed to ggplot2 functions.
# 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)
Run the code above in your browser using DataLab