Skip to content

Commit

Permalink
use pyplot.get_cmap
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverba137 committed Aug 2, 2024
1 parent 38d1ee5 commit 67daa4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions speclite/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 67daa4f

Please sign in to comment.