def recalculate(self): length = min(len(self.x), len(self.y)) x = asarray(self.x)[:length] y = asarray(self.y)[:length] ind = isfinite(x) & isfinite(y) & (self.xfrom <= x) & (x <= self.xto) xx = x[ind] yy = y[ind] self.graph.emit('data-changed', self, xx, yy)
def active_data(self): length = min(len(self.x), len(self.y)) x = asarray(self.x)[:length] y = asarray(self.y)[:length] ind = isfinite(x) & isfinite(y) & (self.xfrom <= x) & (x <= self.xto) return ind