BF(TST): allow AttributeError being raised (in addition to TypeError) from matplotlib
Closes #13570
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [ ] whatsnew entry: imho not worth it?

origin:  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827938
