-
-
Save ghamarian/622f84457063b5ebdb5dbe5d7bc31de1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
from matplotlib import style | |
fig = plt.figure() | |
ax1 = fig.add_subplot(1,1,1) | |
xs = [] | |
ys = [] | |
def animate(i): | |
#df = pd.read_csv('progresshistory.txt', sep=' ', names=['cup', 'fraction', 'date', 'time', 'cest1', "cest2", "m"]) | |
#df.time = pd.to_datetime(df.time).view('int64')/1e6 | |
df = pd.read_csv('amir.txt') | |
df.columns = ['cup', 'fraction', 'time'] | |
df['time'] = pd.to_datetime(df['time']).view('int64')/1e6 | |
ys = df['time'].diff()[-20:] | |
ax1.clear() | |
ax1.plot(ys) | |
#animate(0) | |
anim = animation.FuncAnimation(fig, animate, interval=100) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment