mad_gui.plot_tools.plots.BasePlot#
- class mad_gui.plot_tools.plots.BasePlot(plot_data: PlotData | None = None, initial_plot_channels=None, label_classes: List[BaseRegionLabel] | None = None, event_classes: List[BaseEventLabel] | None = None, parent=None)[source]#
Bases:
PlotWidget
A base plot that can display data and additionally show a yellow line to indicate the current position in a video.
Methods
add_video_cursor_line
([pos])Add a line that shows to which sample in the signal the currently shown video frame corresponds.
enterEvent
(self, event)move_video_cursor_line
(percent_since_start)Move the line that indicates to which signal sample the current video frame corresponds.
Remove the line that indicates video-signal correspondence when the video window is closed.
set_coupled_plot
([other])Couple another plot to this one, such that both plots always have the same x- and y- limits.
set_graph_position
(percent_since_start)Move the graph such that sample is in the middle of the plot.
set_title
(title)Set the title, which will be shown centered on the top of the plot.
add_sync_item
configure_style
finish_syncing
get_mouse_pos_from_event
inside_event_range
inside_label_range
inside_plot_range
set_events
set_labels
snap_to_sample
- add_video_cursor_line(pos: int | None = None)[source]#
Add a line that shows to which sample in the signal the currently shown video frame corresponds.
- Parameters:
- pos
Position at which the line should be shown (in seconds)
- move_video_cursor_line(percent_since_start: float)[source]#
Move the line that indicates to which signal sample the current video frame corresponds.
- Parameters:
- percent_since_start
the percentage of the data stream to jump to since start
- remove_video_cursor_line()[source]#
Remove the line that indicates video-signal correspondence when the video window is closed.
- set_coupled_plot(other: PlotWidget | None = None)[source]#
Couple another plot to this one, such that both plots always have the same x- and y- limits.
- Parameters:
- other
Usually another object of
SensorPlot
.
- set_events(label_class: Type[BaseEventLabel], df: DataFrame)[source]#
- set_graph_position(percent_since_start: float)[source]#
Move the graph such that sample is in the middle of the plot.
- Parameters:
- percent_since_start
the percentage of the data stream to jump to since start
- set_labels(label_class: Type[BaseRegionLabel], df: DataFrame)[source]#