Deltares / Deltares/imod-python

WQ Henry example fails at plotting

Open
#340 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug documentation
Dominant language
Python
Stars
41
Forks
12
Avg merge
21h 8m
Merged PRs (30d)
1

Description

In GitLab by @JoerivanEngelen on Mar 29, 2023, 14:30

Apparently with the deltaforge 0.2.0 installation:

runfile('C:/Users/schadt/training/iMOD_python_examples/henry/Henry.py', wdir='C:/Users/schadt/training/iMOD_python_examples/henry')
Traceback (most recent call last):
  File "C:\Users\schadt\AppData\Local\deltaforge\lib\site-packages\spyder_kernels\py3compat.py", line 356, in compat_exec
    exec(code, globals, locals)
  File "c:\users\schadt\training\imod_python_examples\henry\henry.py", line 150, in <module>
    conc.plot(levels=range(0, 35, 5), yincrease=False, ax=ax)
  File "C:\Users\schadt\AppData\Local\deltaforge\lib\site-packages\xarray\plot\accessor.py", line 46, in __call__
    return dataarray_plot.plot(self._da, **kwargs)
  File "C:\Users\schadt\AppData\Local\deltaforge\lib\site-packages\xarray\plot\dataarray_plot.py", line 312, in plot
    return plotfunc(darray, **kwargs)
  File "C:\Users\schadt\AppData\Local\deltaforge\lib\site-packages\xarray\plot\dataarray_plot.py", line 717, in hist
    primitive = ax.hist(no_nan, **kwargs)
  File "C:\Users\schadt\AppData\Local\deltaforge\lib\site-packages\matplotlib\__init__.py", line 1423, in inner
    return func(ax, *map(sanitize_sequence, args), **kwargs)
  File "C:\Users\schadt\AppData\Local\deltaforge\lib\site-packages\matplotlib\axes\_axes.py", line 6890, in hist
    p._internal_update(kwargs)
  File "C:\Users\schadt\AppData\Local\deltaforge\lib\site-packages\matplotlib\artist.py", line 1186, in _internal_update
    return self._update_props(
  File "C:\Users\schadt\AppData\Local\deltaforge\lib\site-packages\matplotlib\artist.py", line 1160, in _update_props
    raise AttributeError(
AttributeError: Rectangle.set() got an unexpected keyword argument 'levels'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Henry.py example and inspect the plotting call at line 150, where conc.plot raises the reported Matplotlib error under deltaforge 0.2.0. Run the example in that environment and verify that the Henry plot completes without the unexpected-keyword exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, python
Domain
data-visualization
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.