marl / jams

A JSON Annotated Music Specification for Reproducible MIR Research
ISC License
186 stars 27 forks source link

display.events labels and lines are misaligned #209

Open beasteers opened 4 years ago

beasteers commented 4 years ago

I see it when I'm plotting a jams 'onset' annotation.

jams.display.display(jam.annotations[0], meta=False)

It looks like this line is the culprit.

https://github.com/marl/jams/blob/255a5ee860b03cec8f889c9986e734a6393a0dbc/jams/display.py#L105

When I change to ann.to_event_values() everything looks fine.

It's because it's plotting each event with two lines on top of each other (duration=0) and when you zip the line objects and labels, the second label is aligned with the duplicate line on the first event and so on.

bmcfee commented 4 years ago

Excellent catch -- yes, I think that should be events_values in this case.