The plot functions are designed to run with just data and pupil selections, with some additional options for fun with plotting. This allows to see raw data as points, grouped by either subject or condition.
A PupillometryR dataframe
Column name of pupil data to be plotted
What to group the data by (none, condition, or subject)
Geom to pass to ggplot. Either point, line, or pointrange.
Optional argument to plot agains a fitted model
A ggplot object
Sdata <- make_pupillometryr_data(data = pupil_data, subject = ID, trial = Trial, time = Time, condition = Type) Sdata2 <- downsample_time_data(data = Sdata, pupil = LPupil, timebin_size = 100, option = 'median') #> Calculating median pupil size in each timebin p <- plot(Sdata2, pupil = LPupil, group = 'subject') p