Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Scatter Plot: two minor errors #2381

Merged
merged 2 commits into from
Jun 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Orange/widgets/visualize/owscatterplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,9 @@ def set_data(self, data):
self.vizrank.initialize()
self.vizrank.attrs = self.data.domain.attributes if self.data is not None else []
self.vizrank_button.setEnabled(
self.data is not None and self.data.domain.class_var is not None
and len(self.data.domain.attributes) > 1 and len(self.data) > 1)
self.data is not None and not self.data.is_sparse() and
self.data.domain.class_var is not None and
len(self.data.domain.attributes) > 1 and len(self.data) > 1)
if self.data is not None and self.data.domain.class_var is None \
and len(self.data.domain.attributes) > 1 and len(self.data) > 1:
self.vizrank_button.setToolTip(
Expand Down Expand Up @@ -423,7 +424,6 @@ def prepare_data(self):
new=False)

def sparse_to_dense(self, input_data=None):
self.vizrank_button.setEnabled(not (self.data and self.data.is_sparse()))
if input_data is None or not input_data.is_sparse():
return input_data
keys = []
Expand Down
2 changes: 1 addition & 1 deletion Orange/widgets/visualize/owscatterplotgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ def update_shapes(self):
self.make_legend()

def assure_attribute_present(self, attr):
if attr not in self.data.domain:
if self.data is not None and attr not in self.data.domain:
self.master.prepare_data()

def update_grid(self):
Expand Down