Minor changes to plotter - included legend file writer.