def __init__(self, map, points): values = [] x0 = None y0 = None for x1, y1 in points: if x0 is not None and y0 is not None: length = int(np.hypot(x1 - x0, y1 - y0)) x, y = np.linspace(x0, x1, length), np.linspace(y0, y1, length) # Extract the values along the line values = np.append( values, map.data[y.astype(np.int), x.astype(np.int)]) x0 = x1 y0 = y1 PlotWidget.__init__(self) self.updateModel(values)
def __init__(self): PlotWidget.__init__(self)
def __init__(self, map, coordinates): PlotWidget.__init__(self) self.updateModel((map, coordinates))
def __init__(self): self.ax = None PlotWidget.__init__(self)