Plot.py 396 B

12345678910111213141516
  1. import numpy as np
  2. from .globals import *
  3. from .plotim import linear_plot
  4. class Plot(linear_plot):
  5. def __init__(self, xaxis, yaxis, **kwargs):
  6. linear_plot.__init__(self, **kwargs)
  7. self.set_scale(xaxis, yaxis)
  8. def setTimeScale(self, plotLen, delay):
  9. newXaxis = (0, plotLen * delay / 1000)
  10. if newXaxis != self.xaxis:
  11. self.xaxis = newXaxis
  12. self.on_resize()