本文整理匯總了Python中enthought.chaco.api.VPlotContainer.request_redraw方法的典型用法代碼示例。如果您正苦於以下問題:Python VPlotContainer.request_redraw方法的具體用法?Python VPlotContainer.request_redraw怎麽用?Python VPlotContainer.request_redraw使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類enthought.chaco.api.VPlotContainer
的用法示例。
在下文中一共展示了VPlotContainer.request_redraw方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Plots
# 需要導入模塊: from enthought.chaco.api import VPlotContainer [as 別名]
# 或者: from enthought.chaco.api.VPlotContainer import request_redraw [as 別名]
#.........這裏部分代碼省略.........
'''
iterator = iter(self.renderers.values())
while True:
try:
curr = iterator.next()
curr.index_range.low = low
curr.index_range.high = high
except StopIteration:
break
#*************************************set_bounds()*************************************
def set_bounds(self, low, high):
'''
Args:
Returns:
Raises:
'''
iterator = iter(self.renderers.values())
while True:
try:
curr = iterator.next()
curr.index_range.set_bounds(low, high)
except StopIteration:
break
#*************************************_range_selection_handler()*************************************
def _range_selection_handler(self, event):
'''
Args:
Returns:
Raises:
'''
# The event obj should be a tuple (low, high) in data space
if event is not None:
low, high = event
self.set_index_range(low, high)
else:
self.set_bounds("auto", "auto")
#*************************************_plot_range_handler()*************************************
def _plot_range_handler(self, event):
'''
Args:
Returns:
Raises:
'''
if event is not None:
low, high = event
if "auto" not in (low, high):
pass
'''if low < self.df["Time"][0]:
low = self.df["Time"][0]
if high > self.df["Time"][self.counter-1]:
high = self.df["Time"][self.counter-1]
self.range_tool.selection = (low, high)'''
#*************************************change_view()*************************************
def change_view(self, plots_to_show):
'''
Args:
Returns:
Raises:
'''
temp = list(self.container.components) # to get a copy
for plot in temp:
#if type(plot).__name__ == 'Plot':
self.container.remove(plot)
plots_to_show.sort()
for plot in plots_to_show:
self.container.add(self.plots[plot + " " + self.extension].plot_conactory)
self.container.add(self.time_plot) # add the time_plot back last so it is on the bottom
self.container.request_redraw()
#*************************************hide()*************************************
def hide(self):
'''
Args:
Returns:
Raises:
'''
self.hidden = True
self.pc.hide()
#*************************************unhide()*************************************
def unhide(self):
'''
Args:
Returns:
Raises:
'''
self.hidden = False
self.pc.show()