plot.py
This commit is contained in:
parent
30183448ec
commit
ef7d6eb04b
28
plot.py
Normal file
28
plot.py
Normal 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()
|
Loading…
Reference in New Issue
Block a user