In [1]:
cd /Users/lize/data_these/cone_sphere/


/Users/lize/data_these/cone_sphere

In [2]:
import numpy as np
import matplotlib.pylab as plt

In [24]:
def commTimeline(filename):
    a = np.genfromtxt(filename)
    a[:, 0] /= 1e9
    a[:, 1] = np.cumsum(a[:, 1])
    return a

In [41]:
plt.figure()
for i in range(4):
    a = commTimeline('./send-%03d.old.txt' % i)
    plt.plot(a[:, 0], a[:, 1])
for i in range(4):
    a = commTimeline('./send-%03d.txt' % i)
    plt.plot(a[:, 0], a[:, 1])

plt.show()

In [21]:
plt.plot(np.cumsum(a[:, 1]))
plt.show()

In [3]:
a = np.genfromtxt('./send-001.cache.txt')
m = np.cumsum(a[:, 1])
plt.plot(a[:, 0], m)

a2 = np.genfromtxt('./send-001.txt')
m2 = np.cumsum(a2[:, 1])
plt.plot(a2[:, 0] - a2[0, 0] + a[0, 0], m2)

plt.show()

In [15]:


In [ ]: