1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

added script to analyze AIMD

This commit is contained in:
Steffen Vogel 2019-02-15 12:02:05 +01:00
parent 623385cda9
commit aff3e56a5b

27
tools/plots/plot_aimd.py Normal file
View file

@ -0,0 +1,27 @@
#!/usr/bin/env python3
import sys
import matplotlib as mpl
import numpy as np
import matplotlib.pyplot as plt
def read_datafile(file_name):
# the skiprows keyword is for heading, but I don't know if trailing lines
# can be specified
data = np.loadtxt(file_name, delimiter='\t', skiprows=1)
return data
filename = sys.argv[1]
data = read_datafile(filename)
print(data[:,0])
fig, ax1 = plt.subplots()
ax1.plot(data[:,0], data[:,1])
ax2 = ax1.twinx()
ax2.plot(data[:,0], data[:,2], c='red')
fig.tight_layout()
plt.show()