Added outputs to plots.py for Matlab

This commit is contained in:
Matthias Jung
2017-02-28 21:05:24 +01:00
parent 28461df446
commit d0bfc9ccea

View File

@@ -83,6 +83,15 @@ def memory_utilisation_window(connection, tracePath, steps):
plt.figure()
# Write data to a file for matlab:
outputFileNameBWMatlab = 'memory_utilization_percent_' + basename + '.txt'
f = open(outputFileNameBWMatlab, 'w')
for i in range(steps):
line = "{} {}\n".format(time[i], bandwidthPercentage[i])
f.write(line)
#Plot Bandwidth in Percent
plt.plot(time, bandwidthPercentage)
plt.xlabel('Time [ns]')