本文整理汇总了Python中enthought.chaco.api.VPlotContainer.spacing方法的典型用法代码示例。如果您正苦于以下问题:Python VPlotContainer.spacing方法的具体用法?Python VPlotContainer.spacing怎么用?Python VPlotContainer.spacing使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类enthought.chaco.api.VPlotContainer
的用法示例。
在下文中一共展示了VPlotContainer.spacing方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: init
# 需要导入模块: from enthought.chaco.api import VPlotContainer [as 别名]
# 或者: from enthought.chaco.api.VPlotContainer import spacing [as 别名]
def init(self,data):
self.raw = data
self.data_selected = data
index = range(self.raw.length)
self.x1 = 0
self.x2 = self.raw.length
self.epsilon = self.data_selected.epsilon
self.word_size = self.data_selected.word_size
self.alphabet_size = self.data_selected.alphabet_size
self.id1 = self.data_selected.id1
self.id2 = self.data_selected.id2
self.id3 = self.data_selected.id3
self.window_min = self.data_selected.window_min
self.window_max = self.data_selected.window_max
self.window_step = self.data_selected.window_step
self.dist_max = self.data_selected.dist_max
overviewkwargs = {}
for (dim,i) in zip(self.raw.data_transposed, range(len(self.plot_names))):
overviewkwargs[self.plot_names[i]] = dim
overviewdata = ArrayPlotData(index=index, **overviewkwargs)
overview = Plot(overviewdata)
axiscontainer = VPlotContainer()
axiscontainer.spacing = 0
aps = []
paastep = self.selected_length / (len(self.data_selected.data_paaed[0]))
paaindex = range(paastep/2,self.selected_length, paastep)
for (dim,i) in zip(self.raw.data_transposed, range(len(self.plot_names))):
overview.plot(("index",self.plot_names[i]),
type="line",
color=self.plot_colors[i])
ap = Plot(ArrayPlotData(index = index,
paaindex = paaindex,
paa = self.data_selected.data_paaed[i],
**{self.plot_names[i]:self.data_selected.data_transposed[i]}))
ap.plot(("index",self.plot_names[i]), type="line", color=self.plot_colors[i])
ap.plot(("paaindex","paa"), type="scatter", color=self.plot_colors[i])
#ap.title = a["name"]
ap.padding_top = 1
ap.padding_bottom = 0
ap.y_axis.orientation = "right"
axiscontainer.add(ap)
aps.append(ap)
ap.components[1].visible = False
self.aps = aps
rs = RangeSelection(overview.components[0], left_button_selects= True)
self.selector = rs
overview.components[0].tools.append(rs)
overview.components[0].overlays.append(RangeSelectionOverlay(component=overview.components[0]))
lrcontainer = HPlotContainer(overview,axiscontainer)
lrcontainer.spacing = 0
self.plot = lrcontainer