-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprocedures.py
More file actions
executable file
·33 lines (29 loc) · 888 Bytes
/
procedures.py
File metadata and controls
executable file
·33 lines (29 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os.path
from os import path
colors = {
'Subscription Forest':'red'
, 'subscriptionForest':'red'
, 'OpIndex':'cyan'
, 'opIndex':'cyan'
, 'TAMA':'brown'
, 'tama':'brown'
, 'REIN':'magenta'
, 'rein':'magenta'
, "siena": "green"
, "Siena": "green"
, "ACTree":"blue"
, "subscriptionBTree":"blue"
}
# Without H-Tree
def plot(csvFile, x,y, discard=[]):
df = pd.read_table(f'./output/{csvFile}.csv', sep=",") if path.exists(f'./output/{csvFile}.csv') else pd.read_table(f'./output/#save/{csvFile}.csv', sep=",")
fig, ax = plt.subplots()
ax.set(xlabel=x, ylabel=y)
for key, grp in df.groupby(['Algorithm']):
if not key in discard:
ax = grp.plot(ax=ax, kind='line', x=x, y=y, c=colors[key], label=key)
plt.legend(loc='best')
plt.show()