In addition to making it easier to manipulate the plots, this will also make it easier to test the plotting functions. See discussion in #132.