plot_hist | R Documentation |
This function creates a plotly plot with the distribution of values for each
column in the mat
matrix, using different colors for each column.
The legend will show the column names from mat
, and the plot will have
the title "Distribution of read counts".
plot_hist(
mat,
title = NULL,
xlab = "Values",
ylab = "Frequency",
show.grid = FALSE
)
mat |
A matrix with the data to plot. |
title |
A character scalar for the title of the plot. |
xlab |
Character scalar for label of the x-axis. |
ylab |
Character scalar for label of the y-axis. |
show.grid |
A boolean for whether to show the grid lines. |
A plotly plot with the distribution of read counts.
Jared Andrews
library(CRISPRball)
cts <- read.delim(system.file("extdata", "escneg.count_normalized.txt",
package = "CRISPRball"
), check.names = FALSE)
cts.log <- as.matrix(log2(cts[, c(-1, -2)] + 1))
colnames(cts.log) <- colnames(cts)[c(-1, -2)]
plot_hist(cts.log,
title = "Distribution of read counts",
xlab = "log2(counts + 1)", ylab = "Frequency"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.