29 lines
601 B
Python
29 lines
601 B
Python
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()
|