Skip to content

Commit

Permalink
Scatter plot: Reject settings with discrete attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
janezd committed Dec 5, 2018
1 parent 6ad9202 commit 1cefe13
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Orange/widgets/visualize/owscatterplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class Inputs(OWDataProjectionWidget.Inputs):
class Outputs(OWDataProjectionWidget.Outputs):
features = Output("Features", AttributeList, dynamic=False)

settings_version = 3
settings_version = 4
auto_sample = Setting(True)
attr_x = ContextSetting(None)
attr_y = ContextSetting(None)
Expand Down Expand Up @@ -438,12 +438,15 @@ def migrate_settings(cls, settings, version):

@classmethod
def migrate_context(cls, context, version):
values = context.values
if version < 3:
values = context.values
values["attr_color"] = values["graph"]["attr_color"]
values["attr_size"] = values["graph"]["attr_size"]
values["attr_shape"] = values["graph"]["attr_shape"]
values["attr_label"] = values["graph"]["attr_label"]
if version < 4:
if values["attr_x"][1] % 100 == 1 or values["attr_y"][1] % 100 == 1:
raise IncompatibleContext()


if __name__ == "__main__": # pragma: no cover
Expand Down

0 comments on commit 1cefe13

Please sign in to comment.