First version of the plot generator.