#' To plot sequence counts over time
#' @param data A data frame of sequence counts over time, as generated by simulate_bursts
#' @param plot_title What to call the plot
#' @return The figure to be plotted
#' @importFrom magrittr "%>%"
#' @export
plot_sequence_counts <- function(data, plot_title)
{
data <- data %>%
tidyr::gather(key="sequence_index", value="count", -time)
p <- ggplot2::ggplot(data = data,
ggplot2::aes(x=time, y=count, colour=sequence_index))
p <- p + ggplot2::geom_step()
p <- p + ggplot2::labs(x = "number of time steps", y = "Number of copies", title = plot_title)
return(p)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.