geom_line in ggplot

plot_all_V <- ggplot(result_prod,aes(Phase,MeanACC,shape=Subtype))+
  geom_point(size=2)+
  geom_line()+
  ylab("Porduction performance on all verbs")+xlab("Treatment phase")


Why there were no lines?

(1) I want four lines: one line for "Ba", one line for "Bei", one line for "Two-argument", and one line for "Three argument"
(2) After adding lines, how can I change the types of lines, like dashed line...?
Thank you so much!

geom_path: Each group consists of only one observation. Do you need to adjust the group aesthetic?

solution

ggplot(result_prod,aes(Phase,
                       MeanACC,
                       shape=Subtype,
                       group=Subtype))

ggplot(result_prod,aes(Phase,
                       MeanACC,
                       shape=Subtype,
                       group=Subtype,
                       linetype=Subtype))+
  geom_point(size=2)+
  geom_line()+
  ylab("Porduction performance on all verbs")+
xlab("Treatment phase") + 
scale_linetype_manual(
    values=c("longdash","solid",  "dashed", "dotted")
  )
3 Likes

@nirgrahamuk nirgrahamuk solution is perfect. Use that

Wow, fantastic! It helps! Thank you so much!

Yeah! It works! Thanks for your kind reply!