#' plot function for RTMonitor
#'
#' @param data4plot
#' @param config
#' @param screen.n
#'
#' @return
#' @export
#'
#' @examples
plot.calculate <- function(data4plot, config, screen.n) {
if (nrow(data4plot) == 0)
return
with(data4plot, {
now <- timepassed[length(timepassed)]
window.t <- config$window.t
if (!is.numeric(window.t)) {
timelim <- NULL
} else {
x.lo <- now - window.t
x.hi <- now
timelim <- c(x.lo, x.hi)
}
screen(screen.n)
par(mar = config$margin)
plot(
timepassed, peak.y,
type = 'l',
xlim = timelim,
main = paste0(marks[2], ' - ', marks[1]),
xlab = 'time',
ylab = 'Peak Current'
)
points(now, peak.y[length(peak.y)], col = 'red', pch = 16)
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.