Skip to content

v1.3.1 — Event._get_ylim ydata fix

Choose a tag to compare

@praneethnamburi praneethnamburi released this 18 May 05:11
· 77 commits to master since this release

Patch release. One bug fix on the event-overlay path.

Fixed

  • Event._get_ylim (datanavigator/events.py:599) was reading line.get_xdata() while claiming to return a y-axis limit. For fill-display events (display_type="fill"), ax.fill_between then drew a polygon spanning the x-data extent in the y direction; autoscale grew the y-axis to fit.

    Visible reproducer: EventPickerDemo, add a 2-event by pressing 2 at two x positions — pre-fix the y-axis rescaled from ~(0, 1) to ~(0, 10) for the demo's np.random.rand(100) / sr=10 signal. Line-display events were affected too: the vertical event-marker ticks were drawn at the wrong y-extent, contributing oversized ydata to dataLim on the next autoscale.

    Regression tests:

    • tests/test_events.py::test_get_ylim_reads_ydata_not_xdata (unit)
    • tests/test_examples.py::test_event_picker_fill_event_preserves_ylim (end-to-end repro)

📦 PyPI 1.3.1 · 📋 CHANGELOG