diff --git a/Orange/widgets/evaluate/owcalibrationplot.py b/Orange/widgets/evaluate/owcalibrationplot.py index de13a8cf029..ae05481381d 100644 --- a/Orange/widgets/evaluate/owcalibrationplot.py +++ b/Orange/widgets/evaluate/owcalibrationplot.py @@ -15,7 +15,7 @@ from Orange.widgets.evaluate.contexthandlers import \ EvaluationResultsContextHandler from Orange.widgets.evaluate.utils import results_for_preview -from Orange.widgets.utils import colorpalette, colorbrewer +from Orange.widgets.utils import colorpalette from Orange.widgets.utils.widgetpreview import WidgetPreview from Orange.widgets.widget import Input, Output, Msg from Orange.widgets import report @@ -254,10 +254,7 @@ def _initialize(self, results): names = ["#{}".format(i + 1) for i in range(n)] self.classifier_names = names - scheme = colorbrewer.colorSchemes["qualitative"]["Dark2"] - if n > len(scheme): - scheme = colorpalette.DefaultRGBColors - self.colors = colorpalette.ColorPaletteGenerator(n, scheme) + self.colors = colorpalette.get_default_colors(n) for i in range(n): item = self.classifiers_list_box.item(i) diff --git a/Orange/widgets/evaluate/owliftcurve.py b/Orange/widgets/evaluate/owliftcurve.py index ed443d1ae63..1e6ebea8ba9 100644 --- a/Orange/widgets/evaluate/owliftcurve.py +++ b/Orange/widgets/evaluate/owliftcurve.py @@ -19,7 +19,7 @@ from Orange.widgets.evaluate.contexthandlers import \ EvaluationResultsContextHandler from Orange.widgets.evaluate.utils import check_results_adequacy -from Orange.widgets.utils import colorpalette, colorbrewer +from Orange.widgets.utils import colorpalette from Orange.widgets.evaluate.owrocanalysis import convex_hull from Orange.widgets.utils.widgetpreview import WidgetPreview from Orange.widgets.widget import Input @@ -162,10 +162,7 @@ def _initialize(self, results): if names is None: names = ["#{}".format(i + 1) for i in range(N)] - scheme = colorbrewer.colorSchemes["qualitative"]["Dark2"] - if N > len(scheme): - scheme = colorpalette.DefaultRGBColors - self.colors = colorpalette.ColorPaletteGenerator(N, scheme) + self.colors = colorpalette.get_default_colors(N) self.classifier_names = names self.selected_classifiers = list(range(N)) diff --git a/Orange/widgets/evaluate/owrocanalysis.py b/Orange/widgets/evaluate/owrocanalysis.py index 6dbbe748ee1..5099b23dc46 100644 --- a/Orange/widgets/evaluate/owrocanalysis.py +++ b/Orange/widgets/evaluate/owrocanalysis.py @@ -21,7 +21,7 @@ EvaluationResultsContextHandler from Orange.widgets.evaluate.utils import \ check_results_adequacy, results_for_preview -from Orange.widgets.utils import colorpalette, colorbrewer +from Orange.widgets.utils import colorpalette from Orange.widgets.utils.widgetpreview import WidgetPreview from Orange.widgets.widget import Input from Orange.widgets import report @@ -462,10 +462,7 @@ def _initialize(self, results): names = ["#{}".format(i + 1) for i in range(len(results.predicted))] - scheme = colorbrewer.colorSchemes["qualitative"]["Dark2"] - if len(names) > len(scheme): - scheme = colorpalette.DefaultRGBColors - self.colors = colorpalette.ColorPaletteGenerator(len(names), scheme) + self.colors = colorpalette.get_default_colors(len(names)) self.classifier_names = names self.selected_classifiers = list(range(len(names)))