import matplotlib.pyplot as plt
import numpy as np
print("plot")

data1 = np.loadtxt('throughput_cubic_5.plotme')
data2 = np.loadtxt('throughput_cubic_10.plotme')
data3 = np.loadtxt('throughput_cubic_20.plotme')
data4 = np.loadtxt('throughput_cubic_40.plotme')
data5 = np.loadtxt('throughput_cubic_60.plotme')
data6 = np.loadtxt('throughput_cubic_80.plotme')
data7 = np.loadtxt('throughput_cubic_100.plotme')
plt.figure(dpi=400)
plt.plot(data1[0:126, 0], data1[0:126, 1], color='darkgreen', label="N=5", linewidth=1)
plt.plot(data2[0:126, 0], data2[0:126, 1], color='cyan', label="N=10", linewidth=1)
plt.plot(data3[0:126, 0], data3[0:126, 1], color='sienna', label="N=20", linewidth=1)
plt.plot(data4[0:126, 0], data4[0:126, 1], color='violet', label="N=40", linewidth=1)
plt.plot(data5[0:126, 0], data5[0:126, 1], color='r', label="N=60", linewidth=1)
plt.plot(data6[0:126, 0], data6[0:126, 1], color='y', label="N=80", linewidth=1)
plt.plot(data1[0:126, 0], data7[0:126, 1], color='royalblue', label="N=100", linewidth=1)
plt.legend()
plt.title('CUBIC Throughput Under Different Flow Number')
plt.xlabel('Time (S)')
plt.ylabel('Throughput (Mbps)')
#x_ticks = np.arange(0, 0.05)
#plt.xticks(x_ticks)
y_ticks = np.arange(0, 1001, 100)
plt.yticks(y_ticks)

plt.show()