Skip to content

Commit

Permalink
Box Plot: Add box for missing group values
Browse files Browse the repository at this point in the history
  • Loading branch information
PrimozGodec committed Dec 23, 2019
1 parent b3c1e8c commit 9da0bba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Orange/widgets/visualize/owboxplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,13 @@ def compute_box_data(self):
self.dist = []
self.conts = contingency.get_contingency(
dataset, attr, self.group_var)
group_var_labels = self.group_var.values + ["Missing value"]
if self.is_continuous:
stats, label_texts = [], []
for i, cont in enumerate(self.conts):
for i, cont in enumerate(self.conts.array_with_unknowns):
if np.sum(cont[1]):
stats.append(BoxData(cont, attr, i, self.group_var))
label_texts.append(self.group_var.values[i])
label_texts.append(group_var_labels[i])
self.stats = stats
self.label_txts_all = label_texts
else:
Expand Down

0 comments on commit 9da0bba

Please sign in to comment.