View source: R/helper_timerelated.R
time_plot_interval | R Documentation |
Create a plot for event periods by ID
time_plot_interval( dt, xlab = "DateTime", ylab = "ID", legend_title = "Group", arrow_wt = 1, arrow_color = "black" )
dt |
a
|
xlab |
A string for the label of X-axis |
ylab |
A string for the label of Y-axis |
legend_title |
A string for the title of legend |
arrow_wt |
An integer for the weight of arrow |
arrow_color |
A string for the color of arrow |
a plot
library(ggplot2) dt = data.frame( id=c('ID01','ID12','ID3'), idn=c(1,3,2), start=1800*c(0,1,2), end=1800*c(2,-1,3), label=c('A','B','C') ) time_plot_interval( dt, xlab='Time', ylab='ID', legend_title='Group', arrow_wt=3, arrow_color='gray')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.