コード例 #1
0
ファイル: profile.py プロジェクト: vn-ki/solar-viewer
 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)
コード例 #2
0
 def __init__(self):
     PlotWidget.__init__(self)
コード例 #3
0
ファイル: profile.py プロジェクト: vn-ki/solar-viewer
 def __init__(self, map, coordinates):
     PlotWidget.__init__(self)
     self.updateModel((map, coordinates))
コード例 #4
0
 def __init__(self):
     self.ax = None
     PlotWidget.__init__(self)