本文整理汇总了Python中Orange.widgets.visualize.owscatterplotgraph.OWScatterPlotGraph.zoom_actions方法的典型用法代码示例。如果您正苦于以下问题:Python OWScatterPlotGraph.zoom_actions方法的具体用法?Python OWScatterPlotGraph.zoom_actions怎么用?Python OWScatterPlotGraph.zoom_actions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Orange.widgets.visualize.owscatterplotgraph.OWScatterPlotGraph
的用法示例。
在下文中一共展示了OWScatterPlotGraph.zoom_actions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: OWScatterPlot
# 需要导入模块: from Orange.widgets.visualize.owscatterplotgraph import OWScatterPlotGraph [as 别名]
# 或者: from Orange.widgets.visualize.owscatterplotgraph.OWScatterPlotGraph import zoom_actions [as 别名]
#.........这里部分代码省略.........
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(
is_enabled and self.graph.attr_color is not None and
not np.isnan(self.data.get_column_view(self.graph.attr_color)[0].astype(float)).all())
if is_enabled and self.graph.attr_color is None:
self.vizrank_button.setToolTip("Color variable has to be selected.")
else:
self.vizrank_button.setToolTip("")
@Inputs.data
def set_data(self, data):
self.clear_messages()
self.Information.sampled_sql.clear()