Skip to content

Commit

Permalink
Scatter plot: Improve GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
janezd committed Jun 24, 2016
1 parent 3ef668b commit 1007fc3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
7 changes: 5 additions & 2 deletions Orange/widgets/utils/plot/owplotgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,11 @@ def animations_check_box(self, widget):
'''
self._check_box(widget, 'use_animations', 'Use animations', 'update_animations')

def _slider(self, widget, value, label, min_value, max_value, step, cb_name):
gui.hSlider(widget, self._plot, value, label=label, minValue=min_value, maxValue=max_value, step=step, callback=self._get_callback(cb_name))
def _slider(self, widget, value, label, min_value, max_value, step, cb_name,
show_number=False):
gui.hSlider(widget, self._plot, value, label=label, minValue=min_value,
maxValue=max_value, step=step, createLabel=show_number,
callback=self._get_callback(cb_name))

def point_size_slider(self, widget):
'''
Expand Down
15 changes: 8 additions & 7 deletions Orange/widgets/visualize/owscatterplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ def __init__(self):
vizrank_box = gui.hBox(box)
gui.separator(vizrank_box, width=common_options["labelWidth"])
self.vizrank_button = gui.button(
vizrank_box, self, "Rank Projections", callback=self.vizrank.reshow,
tooltip="Find projections with good class separation")
vizrank_box, self, "Score Plots", callback=self.vizrank.reshow,
tooltip="Find plots with good class separation")
self.vizrank_button.setEnabled(False)
gui.separator(box)

Expand All @@ -130,9 +130,6 @@ def __init__(self):
box, self, "graph.attr_label", label="Label:",
emptyString="(No labels)", callback=self.graph.update_labels,
**common_options)
gui.checkBox(
gui.indentedBox(box), self, 'graph.label_only_selected',
'Label only selected points', callback=self.graph.update_labels)
self.cb_attr_shape = gui.comboBox(
box, self, "graph.attr_shape", label="Shape:",
emptyString="(Same shape)", callback=self.graph.update_shapes,
Expand All @@ -147,11 +144,15 @@ def __init__(self):

box = gui.vBox(self.controlArea, "Plot Properties")
g.add_widgets([g.ShowLegend, g.ShowGridLines], box)
gui.checkBox(box, self, value='graph.tooltip_shows_all',
label='Show all data on mouse hover')
gui.checkBox(
box, self, value='graph.tooltip_shows_all',
label='Show all data on mouse hover')
self.cb_class_density = gui.checkBox(
box, self, value='graph.class_density', label='Show class density',
callback=self.update_density)
gui.checkBox(
box, self, 'graph.label_only_selected',
'Label only selected points', callback=self.graph.update_labels)

self.zoom_select_toolbar = g.zoom_select_toolbar(
gui.vBox(self.controlArea, "Zoom/Select"), nomargin=True,
Expand Down

0 comments on commit 1007fc3

Please sign in to comment.