Enable deprecations as warnings and fix test

I think this will require a new matplotlib release to fix a deprecation warning (fixed in matplotlib dev)