interpol uses outdated matplotlib API
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
When running through the 'Example: single-null configuration (introduction)' I am getting an error when clicking 'View loaded file' button.
```
Traceback (most recent call last):
File "/Users/timothynunn/INGRID/INGRID/interpol.py", line 235, in PlotLevel
self.psi_levels[label].collections[0].remove()
KeyError: 'psi_1'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/homebrew/Cellar/python@3.10/3.10.17_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
return self.func(*args)
File "/Users/timothynunn/INGRID/INGRID/gui/ingrid_gui.py", line 516, in ViewData
self.controller.IngridSession.ShowSetup(view_mode=view_mode)
File "/Users/timothynunn/INGRID/INGRID/ingrid.py", line 1323, in ShowSetup
self.PlotPsiNormBounds()
File "/Users/timothynunn/INGRID/INGRID/ingrid.py", line 847, in PlotPsiNormBounds
self.PsiNorm.PlotLevel(self.settings['grid_settings'][k], color=Dic[k], label=k)
File "/Users/timothynunn/INGRID/INGRID/interpol.py", line 241, in PlotLevel
self.psi_levels[label].collections[0].set_label(label)
AttributeError: 'QuadContourSet' object has no attribute 'collections'
```
This is caused by https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.8.0.html#contourset-is-now-a-single-collection
I would suggest the easiest way to fix this is to update the matplotlib requirement in `setup.py`: `matplotlib<3.8.0` and am happy to make this PR.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with setup.py and INGIRD/interpol.py, especially PlotLevel, then run the “Example: single-null configuration (introduction)” workflow and click “View loaded file” to reproduce the traceback. Done means the supported matplotlib requirement avoids the removed QuadContourSet API and the example opens without this error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization, desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100