Skip to content

Compatibility fixes for matplotlib-3.1+

Duncan Macleod requested to merge github/fork/alurban/tex-preamble into develop

Created by: alurban

This PR fixes some compatibility issues with matplotlib-3.1+:

  • Since LaTeX preamble definitions will now have expected type str (not list), try to concatenate TeX macros to a list first, then fall back to a string if that fails (see TeX API changes)
  • Since the public utility matplotlib.scale.get_scale_docs is deprecated, switch to using inspect.getdocs directly while preserving the order of scales (see attribute deprecations)
  • matplotlib.cbook.iterable is deprecated, use numpy.iterable
  • cbar.get_clim is deprecated, use cbar.mappable.get_clim

This fixes #1099 (closed), and supersedes #1100.

cc @duncanmmacleod

Merge request reports