Updated animated demo

This commit is contained in:
MikeTheWatchGuy 2018-08-27 00:31:36 -04:00
parent 2c6164567f
commit de4dd992c3
2 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@ from matplotlib.figure import Figure
import matplotlib.backends.tkagg as tkagg
import tkinter as Tk
VIEW_SIZE = 50 # number of data points visible on 1 screen
def main():
fig = Figure()
@ -38,7 +39,7 @@ def main():
ax.cla()
ax.grid()
ax.plot(range(20), dpts[i:i+20], color='purple')
ax.plot(range(VIEW_SIZE), dpts[i:i+VIEW_SIZE], color='purple')
graph.draw()
figure_x, figure_y, figure_w, figure_h = fig.bbox.bounds
figure_w, figure_h = int(figure_w), int(figure_h)

Binary file not shown.