I would like to plot pupil size (continuous) over time (continuous) as a function of Variable A (2 levels) and Variable B (3 levels). I would like to use different colors for A and line type for B. An example of what I would like to do is displayed is Figure 2A in this paper:
I tried to follow the suggestion of eipi in this thread but it does not work for me (below): this is the code
ggplot(
make_pred_dat(nB=3),
aes(x=IVContinuousA, y=DV, colour=IVCategorical, linetype=factor(round(IVContinuousB,2)))
) +
geom_line()
Could you give me some feedback?