ccrook / QGIS-Contour-Plugin

Contour plugin for QGIS - uses python matplotlib to generate contours of data on vector point data.
43 stars 13 forks source link

#52 second try at fix! #53

Closed ccrook closed 3 months ago

ccrook commented 3 months ago

This mainly addresses the issue caused by changes in matplotlib contouring functions at version 3.8.0 which result in corrupt line contours (adds lines joining each contour segment to the next). This change does not appear to have altered the behaviour of filled contours.

See https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.8.0.html

Prior to this release, ContourSet (the object returned by contour) was a custom object holding multiple Collections (and not an Artist) -- one collection per level, each connected component of that level's contour being an entry in the corresponding collection.

ContourSet is now instead a plain Collection (and thus an Artist). The collection contains a single path per contour level; this path may be non-continuous in case there are multiple connected components.

Also fixed is the "AttributeError: 'NoneType' object has no attribute 'sourceCrs'" error when reloading an existing contour layer (ie layer selected when the dialog box is opened and generating contours).