#' iTplot (gg Variant)
#'
#' @param series
#' @param cursorname
#'
#' @return
#' @export
gg_itplot<-function(series, cursorname){
require(ggEphysAnnotations)
results=series$results()
labels_Y=max(results[cursorname])*1.05
drcresults<-get_lpresults2(results, cursor = cursorname)
ggplot(results, aes_string(y=cursorname, x="relTime")) +
geom_rect(data=drcresults, aes(y=res, ymin=-Inf,ymax=Inf, x=relTime.start, xmin=relTime.start, xmax=relTime.end), alpha=.05) +
geom_text(data=drcresults, aes(y=labels_Y, x=relTime.start+ (relTime.end-relTime.start)*.5, label=Concentration), hjust=.5) +
geom_segment(data=drcresults, aes(y=res,yend=res, x=relTime.start, xend=relTime.end), size=2, alpha=.3)+
geom_point() +
geom_line()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.