So i created a ggplot as below;
using this code:
ggplot(dataset1, aes(x = y, y = x)) + geom_smooth(span=0.2) + ylim(0,5) + xlim(0,23) + ylab("Count")
labs(x="Hours") +
theme_classic()
i then wanted to add an additonal 3 lines to this graph and so tried this code:
ggplot(rbind(dataset1,dataset2,dataset3,dataset4), aes(x = y, y = x)) + geom_smooth(span=0.2) + ylim(0,5) + xlim(0,23) + ylab("count") +
labs(x="Hours") +
theme_classic()
however the graph i was then given was as seen below: enter image description here
which is no where near what I'm trying to do.
I also got an error message after i did this code such as; Warning message: Removed 1 rows containing non-finite values (stat_smooth).
I know i'm going majorly wrong with the second code and probably missing out a part of it but this code isnt something I've used before so just trying my hand at trying to get around it.
Thanks for any help!