本文整理汇总了Python中Orange.widgets.visualize.owscatterplotgraph.OWScatterPlotGraph.box_zoom_select方法的典型用法代码示例。如果您正苦于以下问题:Python OWScatterPlotGraph.box_zoom_select方法的具体用法?Python OWScatterPlotGraph.box_zoom_select怎么用?Python OWScatterPlotGraph.box_zoom_select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Orange.widgets.visualize.owscatterplotgraph.OWScatterPlotGraph
的用法示例。
在下文中一共展示了OWScatterPlotGraph.box_zoom_select方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: OWScatterPlot
# 需要导入模块: from Orange.widgets.visualize.owscatterplotgraph import OWScatterPlotGraph [as 别名]
# 或者: from Orange.widgets.visualize.owscatterplotgraph.OWScatterPlotGraph import box_zoom_select [as 别名]
#.........这里部分代码省略.........
box, self, "attr_x", label="Axis x:", callback=self.update_attr,
model=self.xy_model, **common_options)
self.cb_attr_y = gui.comboBox(
box, self, "attr_y", label="Axis y:", callback=self.update_attr,
model=self.xy_model, **common_options)
vizrank_box = gui.hBox(box)
gui.separator(vizrank_box, width=common_options["labelWidth"])
self.vizrank, self.vizrank_button = ScatterPlotVizRank.add_vizrank(
vizrank_box, self, "Find Informative Projections", self.set_attr)
gui.separator(box)
g = self.graph.gui
g.add_widgets([g.JitterSizeSlider,
g.JitterNumericValues], box)
self.sampling = gui.auto_commit(
self.controlArea, self, "auto_sample", "Sample", box="Sampling",
callback=self.switch_sampling, commit=lambda: self.add_data(1))
self.sampling.setVisible(False)
g.point_properties_box(self.controlArea)
self.models = [self.xy_model] + g.points_models
box_plot_prop = gui.vBox(self.controlArea, "Plot Properties")
g.add_widgets([g.ShowLegend,
g.ShowGridLines,
g.ToolTipShowsAll,
g.ClassDensity,
g.RegressionLine,
g.LabelOnlySelected], box_plot_prop)
self.graph.box_zoom_select(self.controlArea)
self.controlArea.layout().addStretch(100)
self.icons = gui.attributeIconDict
p = self.graph.plot_widget.palette()
self.graph.set_palette(p)
gui.auto_commit(self.controlArea, self, "auto_send_selection",
"Send Selection", "Send Automatically")
self.graph.zoom_actions(self)
def keyPressEvent(self, event):
super().keyPressEvent(event)
self.graph.update_tooltip(event.modifiers())
def keyReleaseEvent(self, event):
super().keyReleaseEvent(event)
self.graph.update_tooltip(event.modifiers())
def reset_graph_data(self, *_):
if self.data is not None:
self.graph.rescale_data()
self.update_graph()
def _vizrank_color_change(self):
self.vizrank.initialize()
is_enabled = self.data is not None and not self.data.is_sparse() and \
len([v for v in chain(self.data.domain.variables, self.data.domain.metas)
if v.is_primitive]) > 2\
and len(self.data) > 1
self.vizrank_button.setEnabled(