R/plot_ch.R

Defines functions plot_ch

plot_ch <- function(df, name, ylimMin = -20, ylimMax = 20, diff = F)
{
  
  pl <- ggplot(df, aes_string(x="t", y=name, colour="mode"))+
    geom_line()+
    theme_classic()+
    ylim(c(ylimMin,ylimMax))+
    theme(legend.position="top")+
    geom_vline(xintercept = 0, size = 1, color = "hotpink4")+
    labs(x = "", y = name)+
    scale_x_continuous(expand = c(0,0))
  
  return(pl)
}
mayenok/hybridEyeEEG documentation built on May 21, 2019, 2:19 p.m.