write plot json files to plot directory