I have plotted a bar graph already and now I'd like to add a curve,going through the top point of each bar so that the trend of change can be sown more clearly.
The data frame is in a format like:
v1 v2
a 10
b 6
c 7
...
Here is the code I plot the bar:
ggplot(date_count, aes(V1,V2)) + geom_bar(stat = "identity")+ theme(axis.text.x = element_text(angle=45, hjust = 1,vjust = 1)) +xlab("date") + ylab("Number of activity")
I have tried +geom_line()
and geom_smooth()
but both failed. Do you have any idea? Thanks in advance.