you can even do it more compactly:

```
plt.plot((events[ev_mask, 0] - first_samp) / sfreq,
         events[ev_mask, 2], '.', color=color, label=labels[idx] if event_id is not None else 'None')
```