Merges from Raf to accept matplotlib changes.