-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfigure16.py
More file actions
29 lines (22 loc) · 827 Bytes
/
figure16.py
File metadata and controls
29 lines (22 loc) · 827 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
import sys
import os
import matplotlib.lines as mlines
import pandas as pd
import seaborn as sns
sys.path.append(os.path.dirname(__file__))
from utils import *
df = pd.read_csv(RESULTS_DIR + f"/figure16.csv")
color_labels = df['search'].unique()
rgb_values = sns.color_palette("Set2", 5)
color_map = dict(zip(color_labels, rgb_values))
ax = df.plot.scatter(x='num_patterns', y='gflops/s', c=df["search"].map(color_map), alpha=0.8, s=10)
ax.spines.right.set_visible(False)
ax.spines.top.set_visible(False)
markers = []
for name, color in color_map.items():
markers.append(mlines.Line2D([], [], color=color, marker='o', linestyle='None', markersize=10, label=name))
plt.xlim(0, 259)
plt.ylabel('Required GFLOP/s')
plt.xlabel('Number of Generated Enumerated Blocks')
plt.legend(handles=markers)
savefig("figure16.pdf")