plot_correlation_heatmap | R Documentation |
This function creates a heatmap using ComplexHeatmap to display the correlation values in a matrix. The color of each cell in the heatmap is determined by the corresponding correlation value, using a color ramp that ranges from the minimum value color to a maximum value color.
plot_correlation_heatmap(
mat,
min.color = "#FF0000",
max.color = "#0000FF",
legend.title = "Pearson Corr.",
plot.title = "Correlation Matrix"
)
mat |
A matrix containing the correlation values. |
min.color |
Character scalar for the hexadecimal color code for the minimum values in the heatmap. |
max.color |
Character scalar for the hexadecimal color code for the maximum values in the heatmap. |
legend.title |
Character scalar for title of the legend. |
plot.title |
Character scalar for title of the plot. |
A Heatmap object.
Jared Andrews
library(CRISPRball)
norm.counts <- read.delim(system.file("extdata", "escneg.count_normalized.txt",
package = "CRISPRball"
), check.names = FALSE)
norm.counts <- as.matrix(norm.counts[, c(-1, -2)])
norm.counts.log <- log2(norm.counts + 1)
cor.mat <- cor(norm.counts.log)
plot_correlation_heatmap(cor.mat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.