xinlii
January 13, 2022, 10:12am
1
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!
xinlii:
Why there were no lines?
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
xinlii
January 13, 2022, 2:56pm
4
Wow, fantastic! It helps! Thank you so much!
xinlii
January 13, 2022, 2:57pm
5
Yeah! It works! Thanks for your kind reply!
system
Closed
February 3, 2022, 2:58pm
6
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.