def __init__(self, fig, gs, time_window=500, labels=None, alphas=None):
self._fig = fig
self._gs = gridspec.GridSpecFromSubplotSpec(1, 1, subplot_spec=gs)
self._ax = plt.subplot(self._gs[0])
self._time_window = time_window
self._labels = labels
self._alphas = alphas
self._init = False
if self._labels:
self.init(len(self._labels))
self._fig.canvas.draw()
self._fig.canvas.flush_events() # Fixes bug with Qt4Agg backend
评论列表
文章目录