Skip to content
This repository has been archived by the owner on Aug 24, 2024. It is now read-only.

Commit

Permalink
Preserve order on GAKE figures
Browse files Browse the repository at this point in the history
  • Loading branch information
jiep committed Feb 20, 2022
1 parent d69a43a commit c6857e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions graphics/generate_graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ def conditions(s):
df = data[(data['operation'] == var) & data['algorithm'].isin(level)]

df2 = df[['algorithm','operation', 'mean_cpu_cycles']]
print(df2["algorithm"])
# print(df2)
# print(level)

Expand Down Expand Up @@ -270,9 +269,9 @@ def conditions(s):
for (j, level) in enumerate(LEVELS):
df = data[(data['operation'] == var) & data['algorithm'].isin(level)]
df2 = df[['algorithm','operation', 'mean_cpu_cycles']]
# print(df2)
# print(level)


# with pd.option_context('display.max_rows', None, 'display.max_columns', None):
# print(df2)

Expand All @@ -285,8 +284,7 @@ def conditions(s):
# )
# axes[j,i].axis('off')


sns.barplot(ax=axes[j,i], x="algorithm", y="mean_cpu_cycles", data=df2, palette=COLORS)
sns.barplot(ax=axes[j,i], x="algorithm", y="mean_cpu_cycles", data=df2, palette=COLORS, order=level)
axes[j,i].set_title(operations_names[i], fontsize="x-large")
# axes[j,i].legend(loc='upper left')
axes[j,i].tick_params(axis='x', rotation=90)
Expand Down
2 changes: 1 addition & 1 deletion graphics/generate_graphics_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def conditions(s):
# axes[j,i].axis('off')


sns.barplot(ax=axes[j,i], x="algorithm", y="mean_time_us", data=df2, palette=COLORS)
sns.barplot(ax=axes[j,i], x="algorithm", y="mean_time_us", data=df2, palette=COLORS, order=level)
axes[j,i].set_title(operations_names[i], fontsize="x-large")
# axes[j,i].legend(loc='upper left')
axes[j,i].tick_params(axis='x', rotation=90)
Expand Down

0 comments on commit c6857e1

Please sign in to comment.