def tracevertexes(self, time, plot, gldrawtype):
# remove datapoints after the first one that is off the screen
for i in range(len(self.points)):
if self.points[i][0] < time - plot.disptime:
self.points = self.points[:i+1]
break
glBegin(gldrawtype)
for point in self.points:
if math.isnan(point[1]):
glEnd()
glBegin(gldrawtype)
else:
y = point[1] - self.offset
if self.directional:
if y >= 180:
y -= 360
elif y < - 180:
y += 360
glVertex2d(point[0]-time, y)
glEnd()
评论列表
文章目录