Writing out plot.