This commit is contained in:
Alexander Munch-Hansen 2018-03-08 16:36:16 +01:00
parent 30183448ec
commit ef7d6eb04b

28
plot.py Normal file
View File

@ -0,0 +1,28 @@
import sys
import pandas as pd
from datetime import datetime
import csv
import matplotlib.pyplot as plt
import matplotlib.ticker as mtick
import matplotlib.dates as mdates
from matplotlib.backends.backend_pdf import PdfPages
headers = ['Phase', 'Method', 'Total episodes', 'Episodes', 'Sum', 'Mean']
df = pd.read_csv(sys.stdin, sep=";", names=headers)
print(df)
x = df['Total episodes']
y = df['Mean']
fig, ax = plt.subplots(1, 1)
plt.title('Mean over episodes')
plt.xlabel('Episodes')
plt.ylabel('Mean')
plt.grid(True)
plt.plot(x,y)
plt.show()
pp = PdfPages(sys.argv[1])
pp.savefig()
pp.close()