visualdynamics.plot.truncation¶
truncation
¶
A truncation drawn on the time history it will be applied to.
A start and a stop time alone do not show whether the kept span covers the part of the record that was intended, so the span is drawn on the plot. The discarded ends are shaded gray, and the kept span can be dragged the same way as the averaging region: by an edge to move that time, or by the middle to slide the whole span along the record.
During a drag only the shading moves. TruncationOverlay.changed is
emitted once, when the mouse is released. A locked overlay cannot be
dragged, which is what a standalone plot needs: nothing there would
keep the span.
Classes:
| Name | Description |
|---|---|
TruncationOverlay |
A truncation drawn as marks on a time history plot. |
Classes¶
TruncationOverlay
¶
TruncationOverlay(plot: Any, truncation: Truncation, first: float, last: float, colors: Mapping[str, str], parent: Any = None, locked: bool = False)
Bases: QObject
A truncation drawn as marks on a time history plot.
The overlay owns every item it adds and removes all of them in
remove, so a redraw cannot leave shading behind. A drag that
leaves a span shorter than a thousandth of the record is undone.
Any other finished drag is reported through changed and not acted
on here: storing the new span and updating the table are left to
whatever created the overlay.
Methods:
| Name | Description |
|---|---|
set_truncation |
Move the marks to a span set elsewhere, without emitting |
Source code in src/visualdynamics/plot/truncation.py
Methods:¶
set_truncation
¶
set_truncation(truncation: Truncation) -> None
Move the marks to a span set elsewhere, without emitting changed.