R/plot_classes.R

Defines functions plot.HEKA_treeinfo_seriesnode plot.HEKA_treeinfo

# not yet exported:
plot.HEKA_treeinfo_seriesnode <- function(node, sweeps = 1:length(node), trace = 1, main = NA, 
    sub = NA, ...) {
  
    # get Series from node
    S <- getSeries_from_node(node, sweeps, trace)
    
    # get path for automaic titles
    path <- attr(node, "path")
    
    # auto main title
    if (is.na(main)) {
        main = paste(path[2], path[3], deparse(substitute(sweeps)), sep = " | ")
    }
    
    # auto sub title
    if (is.na(sub)) {
        sub = path[1]
    }
    
    # plot
    plot(S, main = main, sub = sub)
    
}

plot.HEKA_treeinfo <- function(...) {
    stop("dont know how to plot HEKA data at this hierachy level")
}
tdanker/ephys2 documentation built on Aug. 11, 2019, 12:12 p.m.