Cleaning of plot_data