Added some code that creates .png files of graphs