You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ToDo.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,3 +100,22 @@ When the operating system is using a dark theme, parts of the SerialUI interface
100
100
-`with_alpha`
101
101
-`blend_colors`
102
102
-`build_chart_theme`
103
+
104
+
## Plotting of isolated values
105
+
When occasional values are received interspersed with frequent values from another measurement, the parser and ring buffer correctly keep all channels on the same sample timeline and leave missing entries as `NaN`. This preserves alignment between slow and fast measurements, but sparse channels then appear as isolated finite values surrounded by `NaN`. In pyqtgraph, those `NaN` values break line segments. In fastplotlib, the current compaction of finite values risks connecting points across time gaps. We need a plotting approach that displays sparse event-like values together with dense continuous signals while keeping plotting fast and efficient.
106
+
107
+
[Status: implemented for pyqtgraph and fastplotlib automatic mode]
108
+
[Plan:
109
+
- Keep the current parser and circular buffer structure unchanged so all channels remain aligned on the same sample-number axis and sparse channels continue to be represented by `NaN` gaps.
110
+
- Add a plotting-level render mode concept for traces, with at least `line`, `scatter`, and `hybrid` behavior.
111
+
- Use `auto` as the default engagement mode and do not add new main-window controls in the first implementation.
112
+
- In `auto`, classify each visible trace from the current data pattern and choose between line-only, scatter-only, or hybrid behavior.
113
+
- Keep the first rollout UI-free. If manual override is needed later, add it as a context-menu action on the plot or legend rather than consuming permanent screen space.
114
+
- In pyqtgraph, keep the existing line trace with `connect='finite'` for continuous data and add a scatter overlay for isolated points detected from the visible `NaN` pattern. Done.
115
+
- Detect isolated values efficiently per channel using finite-neighbor checks, for example a point that is finite while both the previous and next samples are non-finite.
116
+
- Keep pyqtgraph legend and visibility behavior tied to the main line item while the scatter overlay remains an internal helper trace. Done.
117
+
- In fastplotlib, stop treating all finite values as a single compacted line when that would bridge time gaps. Preserve segment breaks by inserting separator rows for discontinuities and render isolated samples with a native scatter overlay. Done.
118
+
- Add a simple heuristic or per-channel mode selection so dense channels remain line plots while sparse channels can automatically switch to scatter or hybrid display.
119
+
- In fastplotlib, rebuild the visible trace buffer from the current window so line continuity follows the original sample timeline instead of the old compacted append-only representation. Done.
120
+
- Keep autoscaling and legend behavior consistent across both backends, including visibility toggles and efficient min/max computation for sparse channels.
121
+
- Implement the pyqtgraph version first because it already preserves `NaN` segment breaks cleanly, then bring fastplotlib to feature parity with the same visual behavior.]
0 commit comments