improved plot performance, reduced memory footprint, fixed deepcopy