NRLMMD-GEOIPS / geoips

Main Geolocated Information Processing System code base with basic functionality enabled.
https://nrlmmd-geoips.github.io/geoips/
Other
13 stars 10 forks source link

fixed bug introduced by matplotlib versions >=3.9 #633

Closed evrose54 closed 2 weeks ago

evrose54 commented 2 weeks ago

Reviewer Checklist

Related Issues

fixes NRLMMD-GEOIPS/geoips#632

Testing Instructions

I only tested on ./base_test.sh and will run ./full_test.sh once I can find the time.

Summary

Prior to matplotlib versions >=3.9 we were able to use matplotlib.cm.get_cmap without any problem. After 3.9 was introduced, this failed because cm had no attribute called 'get_cmap'. To fix this, we've migrated such calls from cm.get_cmap to pyplot.get_cmap, as that function still works for pyplot. It's weird that the same functionality was located in two different places, but at least it makes for an easy fix.

modified: geoips/image_utils/colormap_utils.py
modified: geoips/plugins/modules/colormappers/matplotlib_linear_norm.py