diff --git a/sohstationviewer/view/plotting/state_of_health_widget.py b/sohstationviewer/view/plotting/state_of_health_widget.py index 847a7024ee5cdfd1a6b3f0b19a96300077635eb4..bc219840a012ad21555f4fe35dcdffc1e2563d98 100644 --- a/sohstationviewer/view/plotting/state_of_health_widget.py +++ b/sohstationviewer/view/plotting/state_of_health_widget.py @@ -66,16 +66,8 @@ class SOHWidget(MultiThreadedPlottingWidget): linked_ax = None if chan_db_info['linkedChan'] not in [None, 'None', '']: linked_ax = self.plotting_data1[chan_db_info['linkedChan']]['ax'] - if 'ax' not in c_data: - ax = getattr(self.plotting, plot_functions[plot_type][1])( - c_data, chan_db_info, chan_id, None, linked_ax) - if ax is None: - return - c_data['ax'] = ax - ax.chan = chan_id - self.axes.append(ax) - else: - for artist in c_data['ax'].lines + c_data['ax'].collections: - artist.remove() - getattr(self.plotting, plot_functions[plot_type][1])( - c_data, chan_db_info, chan_id, c_data['ax'], linked_ax) + ax = getattr(self.plotting, plot_functions[plot_type][1])( + c_data, chan_db_info, chan_id, None, linked_ax) + c_data['ax'] = ax + ax.chan = chan_id + self.axes.append(ax)