NumPy
어레이에 저장된 여러 시계열 데이터를 동일한 플롯에서 각 시계열 오프셋을 사용하여 플롯하려는 경우 효과적으로 자체 Y 축을 갖습니다. 이 작업을 수행하는 가장 좋은 방법은 각 시리즈를 별도의 VPlotContainer
에 넣는 것일 수 있다고 생각했지만, configure_traits()
전화를 걸 때 방금 빈 창이 나타납니다. 기계류가 처리 할 시간이 너무 많다는 문제가 있습니까?Chaco에서 VPlotContainers를 사용하여 여러 시계열을 그려보세요. 사용 가능한 VPlotContainer 객체 수 제한
class EEGPlot(HasTraits):
plot = Instance(VPlotContainer)
traits_view = View(
Item('plot',editor=ComponentEditor(), show_label=False),
width=1024, height=768, resizable=True, title="EEG Preview")
def __init__(self, eegObject):
super(EEGPlot, self).__init__()
x = xrange(eegObject.windowStart, eegObject.windowEnd)
plotNames = {}
allPlots = []
for idx, column in enumerate(eegObject.data[:,:].transpose()): # only included indexes to indicate array dimensions
y = column
plotdata = ArrayPlotData(x=x, y=y)
myplot = Plot(plotdata)
myplot.plot(("x", "y"), type="line", color="blue")
plotNames["plot{0}".format(idx)] = myplot
allPlots.append(plotNames["plot{0}".format(idx)])
container = VPlotContainer(*allPlots)
container.spacing = 0
self.plot = container
그래서 내 EEGObject는 2 차원의 NumPy 배열입니다. 약 1500 (행) ~ 65 (열). 내가 뭔가 잘못하고 있거나 너무 많은 컨테이너를주고 있기 때문에 빈 화면이 나타나는지 궁금합니다.