implemented CSV saving of plots

Andy needed an emergency implementation of CSV generation from plots; here it is!