def __init__(self, calc, vaxis_format="%s", ndatasets=1, scale_unit=True, auto_scale_vaxis=True): Figure.__init__(self) self.calc = calc self._vaxis_format = vaxis_format self._ndatasets = ndatasets self._points = [[] for i in range(ndatasets)] self._width = 160 self._height = 120 self._vertical_dividers = 4 self._auto_scale_vaxis = auto_scale_vaxis self._scale = 100 self._scale_unit = scale_unit self._detail_line_pos = None # how many seconds each pixel represents self._seconds_per_hpixel = 1 self._colors = [(0, 0, 0) for i in range(ndatasets)]
def __init__(self, calc, label1, label2): Figure.__init__(self) self.calc = calc self._label1 = label1 self._label2 = label2 self._value1 = 0 self._value2 = 0 self.set_usize(150, 56)
def __init__(self, calc): Figure.__init__(self) self.calc = calc self._max_value = 100 self._max_seen_value = 0 self._value = 0 self.set_usize(100, 100)
def __init__(self, dummy, height): Figure.__init__(self) self._height = height
def mouse_move(self, x, y): Figure.mouse_move(self, x, y) if self._detail_line_pos != x - self.x: self._detail_line_pos = x - self.x self.invalidate(repaint_only=True)
def hover_out(self, x, y): Figure.hover_out(self, x, y) self._detail_line_pos = None