For the life of me I cannot get my plot points to connect. They are invisible or try to connect every single dot in a crazy jagged line. My data looks like
df <- read.table(text = "year variable value
2018-19 estimated.males 666
2019-20 estimated.males 734
2020-21 estimated.males 682
2018-19 estimated.females 356
2019-20 estimated.females 342
2020-21 estimated.females 351
2018-19 total 1022
2019-20 total 1076
2020-21 total 1033", header = T)
my code is as follows
ggplot(df, aes(x = year, y = value, colour= variable, shape = variable), group = 1) +
geom_point()+
geom_path(aes(colour= variable))+
geom_text(aes(label = value), size = 3, colour = "black")+
theme(axis.line= element_line(colour= "black"), panel.background= element_blank(),
axis.text.x = element_text(angle = 30, hjust = 1, vjust = 1))+
labs(x= "Year", y= "Estimation Harvested",
title = "Harvest Estimation")