We might often find ourselves using similar code repetitively to plot similar kinds of data or different versions of the same dataset. Once we have analyzed our data and are looking to produce a finished graph, it can be useful to quickly try out different color combinations and other aesthetic settings without having to write too much repetitive code. In this recipe, we will learn how to create graph templates and use them to quickly try out various looks for a graph.
We will only use the base graphics functions for this recipe. So, just open up the R prompt and type in the following code. We will use the
themes.csv file that contains theme parameters for this recipe. So, let's first load it: