Add test if quantities work with matplotlib (issue #1881)