diff --git a/orangecontrib/survival_analysis/widgets/owkaplanmeier.py b/orangecontrib/survival_analysis/widgets/owkaplanmeier.py index 0663070..4143867 100644 --- a/orangecontrib/survival_analysis/widgets/owkaplanmeier.py +++ b/orangecontrib/survival_analysis/widgets/owkaplanmeier.py @@ -494,8 +494,10 @@ def generate_plot_curves(self) -> List[EstimatedFunctionCurve]: filter_ = IsDefined(columns=[self.time_var, self.event_var]) # if undefined values are detected in time_var or event_var omit rows with undefined values - if self.data[:, [self.time_var]].has_missing() or self.data[:, [self.event_var]].has_missing(): - self._data = filter_(self.data) + self._data = filter_(self.data) + if len(self.data) == len(self._data): + self._data = None + else: self.Warning.missing_values() data = self.data if self._data is None else self._data