mir_eval
mir_eval copied to clipboard
[CR] matplotlib modernization
This PR will fix #364
This is still in-progress, but the basic idea is to use temporary artists to probe the axes style cycler indirectly, rather than accessing private / undocumented axes attributes.
So far, all the patch-based artists (segments etc) and spectrogram displays seem to work on my local environment, as well as events
. I haven't started on pitch yet, as these need a rewrite IMO.
A couple of things to think about:
- There isn't a clean way in matplotlib to probe the "style" attributes of an artist, as distinct from all attributes. We might just need to be explicit about what properties we're willing to inherit from the cycler and which ones we aren't.
- Labeled interval display needs a rewrite due to the deprecation of
BrokenBarHCollection
. We could rewrite this asPolyCollection
, but will need to explicitly construct our own polies. - It will probably make sense to extend the functionality of
freq_to_voicing
to handle nans, as was done in #379. To prevent some unintended consequences, this behavior might need to be disabled by default.