cleaning up plotting data structure