'Clear all relevant data from the widget.'

def clear(self):

    self.model = None
    self.instances = None
    self.clf_dataset = None
    self.tree_adapter = None
    if (self.legend is not None):
        self.scene.removeItem(self.legend)
    self.legend = None
    self.ptree.clear()
    self._clear_info_box()
    self._clear_target_class_combo()
    self._clear_depth_slider()
    self._update_log_scale_slider()
