Fix plotting routine that was incredibly slow. Just introducing a clf at the end helps immensely.