diff --git a/plot.py b/plot.py new file mode 100644 index 0000000..ed81069 --- /dev/null +++ b/plot.py @@ -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()