- class TMSiFrontend.plotters.signal_plotter.SignalPlotter(*args: Any, **kwargs: Any)#
Bases:
Plotter
SignalPlotter object
- __init__(get_data_callback=None, update_viewer_time_scrollbar_callback=None, name='Signal Plotter')#
Initialize the SignalPlotter object
- Parameters:
get_data_callback (function, optional) – function to be called when the interface is updated (used in case of offline application), defaults to None
name (str, optional) – name of the signal plotter, defaults to “Signal Plotter”
Methods
__init__
([get_data_callback, ...])Initialize the SignalPlotter object
add_time_marker
(time_value[, key, color])Add a time marker to the chart
Autoscale amplitudes of the channels
delete_time_marker
([key])Delete time marker.
downsample_based_on_screen
(data_to_plot, ...)Downsample data to plot and time span based on screen
Downsample data to plot and time span based on screen
Downsample data to plot and time span based on screen
enable_all_channels
([enabled])Enable all channels to be seen
Get time markers
increase_time_window
(isIncrease)initialize_channels_components
(channels)Initialize channels components
Manual set of the scale value
Remove offset of the channels
set_time_ticks
(time_values, time_ticks)set_tracks_range
(min, length)update_chart
(data_to_plot[, time_span])Update chart
Update color of the chart based on the channel component
Update the enabled channels based on channel component
Update the offset based on channel component
Update the scale based on channel component
update_time_marker
(time_value[, key])Update time marker
update_time_ticks
(start_time, end_time)Update time ticks
- add_time_marker(time_value, key=None, color='red')#
Add a time marker to the chart
- Parameters:
time_value (float) – time coordinate on the chart
key (str, optional) – name of the marker, defaults to None
color (str, optional) – color of the marker, defaults to “red”
- autoscale()#
Autoscale amplitudes of the channels
- delete_time_marker(key=None)#
Delete time marker. If key is not specified, all time markers are cleared.
- Parameters:
key (str, optional) – name of the time marker to delete, defaults to None
- downsample_based_on_screen(data_to_plot, time_span)#
Downsample data to plot and time span based on screen
- Parameters:
data_to_plot (list of array) – data to plot
time_span (list) – time coordinates
- Returns:
data to plot and time span
- Return type:
list of array, list
- downsample_based_on_screen_max_min(data_to_plot, time_span)#
Downsample data to plot and time span based on screen
- Parameters:
data_to_plot (list of array) – data to plot
time_span (list) – time coordinates
- Returns:
data to plot and time span
- Return type:
list of array, list
- downsample_based_on_screen_mean(data_to_plot, time_span)#
Downsample data to plot and time span based on screen
- Parameters:
data_to_plot (list of array) – data to plot
time_span (list) – time coordinates
- Returns:
data to plot and time span
- Return type:
list of array, list
- enable_all_channels(enabled=True)#
Enable all channels to be seen
- Parameters:
enabled (bool, optional) – True if to enable, False otherwise, defaults to True
- get_time_markers()#
Get time markers
- Returns:
The dictionary containing all the active time markers.
- Return type:
dict
- initialize_channels_components(channels)#
Initialize channels components
- Parameters:
channels (list[TMSiChannel] or list[str]) – list of channels to be plotted and controlled. Can be TMSiChannel or just the channel name as string
- manual_scale()#
Manual set of the scale value
- remove_offset()#
Remove offset of the channels
- update_chart(data_to_plot, time_span=None)#
Update chart
- Parameters:
data_to_plot (list[list]) – data to be plotted
time_span (list, optional) – time span for the channels (None to be automatically plotted in the range), defaults to None
- update_colors()#
Update color of the chart based on the channel component
- update_enabled_channels()#
Update the enabled channels based on channel component
- update_offsets()#
Update the offset based on channel component
- update_scales()#
Update the scale based on channel component
- update_time_marker(time_value, key=None)#
Update time marker
- Parameters:
time_value (float) – position of the marker
key (str or float, optional) – name of the marker, defaults to None
- update_time_ticks(start_time, end_time)#
Update time ticks
- Parameters:
start_time (float) – initial time value
end_time (float) – final time tick