| 204 | self.plotData3.scale(scale_factor_x, scale_factor_y) |
| 205 | |
| 206 | def add_data(self): |
| 207 | with self.update_lock: |
| 208 | #the scale factors are used to adapt the values to the view |
| 209 | self.plotData1.add_coord(self.count, math.atan(self.count / 180.0 * math.pi)) |
| 210 | self.plotData2.add_coord(self.count, math.cos(self.count / 180.0 * math.pi)) |
| 211 | self.plotData3.add_coord(self.count, math.sin(self.count / 180.0 * math.pi)) |
| 212 | self.svgplot.render() |
| 213 | self.count += 10 |
| 214 | if not self.stop_flag: |
| 215 | Timer(0.1, self.add_data).start() |
| 216 | |
| 217 | |
| 218 | if __name__ == "__main__": |