clean up output format for automated plotting