grid.add_widget(yax, 0, 0) yax.link_view(view) xax = scene.AxisWidget(orientation='bottom') xax.stretch = (1, 0.05) grid.add_widget(xax, 1, 1) xax.link_view(view) N = 4900 M = 2000 cols = int(N**0.5) view.camera.rect = (0, 0, cols, N / cols) lines = scene.ScrollingLines(n_lines=N, line_size=M, columns=cols, dx=0.8 / M, cell_size=(1, 8), parent=view.scene) lines.transform = scene.STTransform(scale=(1, 1 / 8.)) def update(ev): m = 50 data = np.random.normal(size=(N, m), scale=0.3) data[data > 1] += 4 lines.roll_data(data) canvas.context.flush() # prevent memory leak when minimized timer = app.Timer(connect=update, interval=0) timer.start()
yax.link_view(view) xax = scene.AxisWidget(orientation='bottom') xax.stretch = (1, 0.05) grid.add_widget(xax, 1, 1) xax.link_view(view) N = 4 M = 1000 view.camera.rect = (0, 526200, 1, 500) lines = scene.ScrollingLines( n_lines=N, line_size=M, columns=1, dx=0.8 / M, #color = 'red', cell_size=(1, 8), parent=view.scene) lines.transform = scene.STTransform(scale=(1, 1 / 8.)) cfg = config.Config( i2c={ "port": 8, }, bus=[ { "name": "spi", "type": "i2cspi", "address": 0x28 },