Reputation: 23
I am using the below code and obtained the following graph. However I would like to dots to be joined by lines to make a line graph but my geom_line code does not seem to be working. Any help would be greatly appreciated.
ggplot(data, aes(x= Date, y= Germ)) +
geom_line(aes(colour = Type, linetype = Year)) +
geom_point(aes(colour = Type))+
labs(x="Burial Weeks", y="% Emergence", colour="", linetype = "Collection Year") + # Changed legend title
facet_wrap(~SP) +
geom_vline(xintercept=14, lwd=0.5, colour="black") +
scale_y_continuous(breaks = pretty_breaks(), limits=c(0,100)) +
theme_classic()+
scale_color_manual(values=c("royalblue", "forestgreen"))+
theme(strip.text.x = element_text(size=10, face="italic"),
legend.position = c(0.85,0.70),
axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))
Upvotes: 0
Views: 24