Adding title, subtitle, and caption to the plot

We can conveniently do this employing labs, which lets us specify a titlesubtitle, and caption argument:

cash_flow_report %>% 
ggplot(aes(x = y, y = cash_flow, group = x, colour = x))+
geom_point()+
geom_line()+
labs(title = "cash flows over time by region", subtitle="quarterly data from 2014 to Q2 2017")

Much, much better. Let's move on to the axis and legend labels.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset