def main():
    x, y = make_noise_sin_wave(10, 10000)


    ax = pl.subplot(111)
    x, y = make_noise_sin_wave(20, 100000)
    line, = pl.plot(*get_peaks(x, y, 500))

    ax = pl.gca()

    def update_data(ax):
        x0, x1 = ax.get_xlim()
        line.set_data(*get_peaks(x, y, 500, x0, x1))
        ax.figure.canvas.draw_idle()

    ax.callbacks.connect('xlim_changed', update_data)
    pl.show()
コード例 #2
0
ファイル: fast_curve_draw.py プロジェクト: Andor-Z/scpy2
def main():
    x, y = make_noise_sin_wave(10, 10000)


    ax = pl.subplot(111)
    x, y = make_noise_sin_wave(20, 100000)
    line, = pl.plot(*get_peaks(x, y, 500))

    ax = pl.gca()

    def update_data(ax):
        x0, x1 = ax.get_xlim()
        line.set_data(*get_peaks(x, y, 500, x0, x1))
        ax.figure.canvas.draw_idle()

    ax.callbacks.connect('xlim_changed', update_data)
    pl.show()
 def update_data(ax):
     x0, x1 = ax.get_xlim()
     line.set_data(*get_peaks(x, y, 500, x0, x1))
     ax.figure.canvas.draw_idle()
コード例 #4
0
ファイル: fast_curve_draw.py プロジェクト: Andor-Z/scpy2
 def update_data(ax):
     x0, x1 = ax.get_xlim()
     line.set_data(*get_peaks(x, y, 500, x0, x1))
     ax.figure.canvas.draw_idle()