diff --git a/gwsumm/tabs/guardian.py b/gwsumm/tabs/guardian.py index 8f1a383c..ede167b1 100644 --- a/gwsumm/tabs/guardian.py +++ b/gwsumm/tabs/guardian.py @@ -27,7 +27,7 @@ import numpy -from matplotlib.cm import get_cmap +from matplotlib import colormaps from matplotlib.colors import Normalize from astropy.time import Time @@ -113,7 +113,7 @@ def from_ini(cls, config, section, plotdir='plots', **kwargs): labels = ['[%d] %s' % (grdidxs[state], state) for state in pstates] # define colours - cmap = get_cmap('brg')(Normalize(-1, 1)( + cmap = colormaps['brg'](Normalize(-1, 1)( numpy.linspace(-1, 1, len(pstates))))[::-1] th = len(flags) > 8 and (new.span[1] - new.span[0])/200. or 0 diff --git a/pyproject.toml b/pyproject.toml index cd294137..4f5bb83a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ dependencies = [ "lxml", "markdown", "MarkupPy", - "matplotlib >=3.5", + "matplotlib >=3.9", "numpy >=1.16", "pygments >=2.7.0", "python-dateutil",