Incompatibility with matplotlib 3.10.0

In a fresh installation of kdotpy through pip, I noticed that the tests ll_axial, ll_bia, and ll_legacy failed. They raise the following exception:

  File ".../kdotpy/ploto/dos.py", line 112, in add_contours
    if len(contours.collections) != len(levels):
           ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'QuadContourSet' object has no attribute 'collections'

The exception is raised for matplotlib version 3.10.0, but not for earlier versions (tested with matplotlib v3.9.0). The kdotpy versions 1.0.0 and 1.0.1 are both affected in the same manner.

The exception is strange, because according to the matplotlib documentation, a QuadContourSet instance should have the attribute collections. See https://matplotlib.org/3.10.0/api/contour_api.html.

I will investigate further and find out if a fix or a workaround is needed. The inconsistency between the observed behaviour and the matplotlib documentation suggests that the bug may be in matplotlib v3.10.0. If that is true, nothing needs to be done from our side.

Edited by Wouter Beugeling