Let’s compile existing png files into one pdf, using a simple function, called merge.png.pdf():
Choosing right colors is one of the most significant factors in drawing a effective graph.
arrangeGrob is in “gridExtra” package. Why arrangeGrob()? it returns a frame grob which can be saved by ggsave(). grid.aarange( ), however, directly plots on a graphics device.
A package called, scales, is very useful for controlling the x-axis on a time-series ggplot.We will mainly use date_breaks() and date_format() functions in “scales” package to control the time-axis.