- class TMSiFrontend.charts.signal_chart.SignalChart(plotter_chart)#
Bases:
Chart
Signal chart object
- __init__(plotter_chart)#
Initialize the Signal chart
- Parameters:
plotter_chart (QWidget) – widget where the chart is going to lay.
Methods
__init__
(plotter_chart)Initialize the Signal chart
add_time_marker
(time_value[, key, color])Add a time marker to the chart
delete_time_marker
([key])Delete time marker.
Get time markers
initUI
()Initialize UI
set_time_min_max
(x_min, x_max)Set time range
set_time_range
(time_value)Set time range
set_time_ticks
(time_ticks)set_vertical_range
(min, length)setup_signals
(n_signals[, colors])Setup the signals
update_chart
(signals[, time_span])update chart
update_time_marker
(time_value[, key])Update time marker
update_time_ticks
(start_time, end_time)Update ticks of the time axis
update_y_ticks
(list_names, list_offsets, ...)Update left axis 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”
- 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
- get_time_markers()#
Get time markers
- Returns:
The dictionary containing all the active time markers.
- Return type:
dict
- initUI()#
Initialize UI
- set_time_min_max(x_min, x_max)#
Set time range
- Parameters:
time_value (float) – size of time window
- set_time_range(time_value)#
Set time range
- Parameters:
time_value (float) – size of time window
- setup_signals(n_signals, colors=None)#
Setup the signals
- Parameters:
n_signals (int) – number of curves
colors (rgb tuple, optional) – colors of the signals, defaults to None
- update_chart(signals, time_span=None)#
update chart
- Parameters:
signals (list[list]) – data to plot
time_span (list, optional) – time axis value, defaults to None
- 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 ticks of the time axis
- Parameters:
start_time (float) – initial tick position
end_time (float) – final tick position
- update_y_ticks(list_names, list_offsets, list_scales, list_units)#
Update left axis ticks
- Parameters:
list_names (list[str]) – channel names
list_offsets (list[float]) – offsets
list_scales (list[float]) – scales