I am trying to understand ggplot2 and I tried this code:
a=as.data.frame(c(2007:2016))
str(a)
b=runif(10, 1000, 2000) #vector
c=runif(10, 500,1000) #vector
ggplot(data=a, aes(x=a)) +
geom_bar(aes(y=b), stat = "identity") +
geom_line(aes(y=c), color="white", size=0.75)
Why is there no legend and how can I have one?