import numpy as np
import matplotlib.pyplot as plt

f=open('buoyancy.dat','rb')

n = np.fromfile(f,'i8',1)[0]
h = np.fromfile(f,'d',1)[0]

t=np.zeros(n+1)
z=np.zeros(n+1)

for i in range(n+1):
    x = np.fromfile(f,'d',2)
    t[i] = h*i
    z[i] = x[0]
f.close() 

plt.ylim(-1, 1)
plt.xlim(t[0], t[n])        
plt.plot(t,z)
plt.xlabel(r'$t$')
plt.ylabel(r'$z$')
plt.pause(100)




