Improved image support

Matplotlib 2.0 now resamples images with less memory and less data type conversion.