fixed matplotlib deprecation warning