craffel / mir_eval

Evaluation functions for music/audio information retrieval/signal processing algorithms.
MIT License
588 stars 109 forks source link

Fix display tests for matplotlib 3.9 #383

Open bmcfee opened 2 weeks ago

bmcfee commented 2 weeks ago

This came up in #382 , but matplotlib 3.9 is causing some regressions on display tests. From a quick read-through of the changelog, I don't see any obvious culprits.

It may have something to do with legend positioning or tick markers. :shrug:

bmcfee commented 2 weeks ago

Had a chance to test this locally, it's a grab bag. Most failures are indeed due to legend location, and we can fix this by setting the loc explicitly.

Segment displays are somehow back to not setting limits properly though, so the viewport is completely wrong. These will take some work to fix.

bmcfee commented 2 weeks ago

Ok, I think this issue with segments is due to this change: https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.9.0.html#boxplots-now-ignore-masked-data-points - axvspan now creates Rectangle instead of Polygon patches, and for some reason that means they are now not participating in data limit calculations.

bmcfee commented 2 weeks ago

Issue punted upstream to https://github.com/matplotlib/matplotlib/issues/28383