bugfix: import matplotlib.patches

because it is not loaded by default.
Add test to catch this. Note that it is quite rare for it to arise, because 'ax' is a required argument, and creating Axes with pyplot will result in loading matplotlib.patches.