diff --git a/Orange/widgets/visualize/owlineplot.py b/Orange/widgets/visualize/owlineplot.py index bce51e2b49b..0a013584cba 100644 --- a/Orange/widgets/visualize/owlineplot.py +++ b/Orange/widgets/visualize/owlineplot.py @@ -802,7 +802,7 @@ def setup_plot(self): def plot_groups(self): self._remove_groups() - data = self.data[self.valid_data, self.graph_variables] + data = self.data[self.valid_data][:, self.graph_variables] if self.group_var is None: self._plot_group(data, np.where(self.valid_data)[0]) else: diff --git a/Orange/widgets/visualize/tests/test_owlineplot.py b/Orange/widgets/visualize/tests/test_owlineplot.py index e82a223eac8..8260a1f0461 100644 --- a/Orange/widgets/visualize/tests/test_owlineplot.py +++ b/Orange/widgets/visualize/tests/test_owlineplot.py @@ -232,6 +232,14 @@ def test_group_var_none(self): self.assertEqual(p, 2) self.assertFalse(self.widget.graph.legend.isVisible()) + def test_group_var_none_single_instance(self): + self.send_signal(self.widget.Inputs.data, self.housing[:1]) + m, n, p = self.widget.graph.view_box._profile_items.shape + self.assertEqual(m, len(self.housing.domain.attributes)) + self.assertEqual(n, 1) + self.assertEqual(p, 2) + self.assertFalse(self.widget.graph.legend.isVisible()) + def test_datasets(self): for ds in datasets.datasets(): self.send_signal(self.widget.Inputs.data, ds)