Skip to content

In newer version of matplotlib contour.py is failing #7

@avikhagol

Description

@avikhagol
$ rgbmaker -p NGC4262
Traceback (most recent call last):
  File "/home/avialxee/.local/bin/rgbmaker", line 8, in <module>
    sys.exit(cli())
  File "/home/avialxee/.local/lib/python3.9/site-packages/rgbmaker/cli.py", line 44, in cli
    q = query(name=name,position=position,radius=radius,imagesopt=imagesopt,archives=archives,kind=kind,spidx_file=spidx_file,
  File "/home/avialxee/.local/lib/python3.9/site-packages/rgbmaker/fetch.py", line 289, in query
    ax2.contour(tgss, lvlct, colors='magenta')
  File "/home/avialxee/.local/lib/python3.9/site-packages/astropy/visualization/wcsaxes/core.py", line 254, in contour
    cset = super().contour(*args, **kwargs)
  File "/home/avialxee/.local/lib/python3.9/site-packages/matplotlib/__init__.py", line 1442, in inner
    return func(ax, *map(sanitize_sequence, args), **kwargs)
  File "/home/avialxee/.local/lib/python3.9/site-packages/matplotlib/axes/_axes.py", line 6451, in contour
    contours = mcontour.QuadContourSet(self, *args, **kwargs)
  File "/home/avialxee/.local/lib/python3.9/site-packages/matplotlib/contour.py", line 769, in __init__
    kwargs = self._process_args(*args, **kwargs)
  File "/home/avialxee/.local/lib/python3.9/site-packages/matplotlib/contour.py", line 1411, in _process_args
    x, y, z = self._contour_args(args, kwargs)
  File "/home/avialxee/.local/lib/python3.9/site-packages/matplotlib/contour.py", line 1460, in _contour_args
    self._process_contour_level_args(args, z.dtype)
  File "/home/avialxee/.local/lib/python3.9/site-packages/matplotlib/contour.py", line 1142, in _process_contour_level_args
    if len(self.levels) > 1 and np.min(np.diff(self.levels)) <= 0.0:
TypeError: len() of unsized object

error first seen on matplotlib version 3.7.0
while matplotlib-3.5.3 is working fine
error generated using python3.9

https://github.com/avialxee/rgbmaker/blob/fa8f349e463afb53de7ce33aaa490823f11e7adf/src/rgbmaker/fetch.py#L287

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions