diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 32f8a41..82941b9 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -72,7 +72,7 @@ jobs: run: | python -m pip install --upgrade pip wheel setuptools python -m pip install pytest pytest-astropy pyyaml coveralls - python -m pip install numpy\<2.0 scipy matplotlib astropy\<6.0 + python -m pip install numpy\<1.23 scipy\<1.9 matplotlib\<3.9 astropy\<5.1 - name: Run the test with coverage run: pytest --cov diff --git a/speclite/filters.py b/speclite/filters.py index 1c1c076..93c0fb7 100644 --- a/speclite/filters.py +++ b/speclite/filters.py @@ -1991,12 +1991,8 @@ def plot_filters(responses, wavelength_unit=None, min_wlen, max_wlen = min(effective_wavelengths), max(effective_wavelengths) import matplotlib.pyplot as plt - try: - import matplotlib.colormaps as cm - except ImportError: - import matplotlib.cm as cm - cmap = cm.get_cmap(cmap) + cmap = plt.get_cmap(cmap) fig, ax = plt.subplots() plt.xscale(wavelength_scale) if wavelength_limits is not None: