Skip to content

Commit

Permalink
Better hist
Browse files Browse the repository at this point in the history
  • Loading branch information
gevtushenko committed May 1, 2023
1 parent 6a6fdaf commit e8dce77
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions benchmarks/scripts/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,19 +195,25 @@ def coverage(args):


def case_variants(pattern, algname, ct_point_name, case_df):
print("{}[{}]:".format(algname, ct_point_name))
mask = case_df['variant'].str.contains(pattern, regex=True)
# df = case_df[mask][['variant', 'speedup'] + get_rt_axes(case_df)]

for _, row in case_df[mask].iterrows():
data = {row['variant']: row['samples'],
'base': row['base_samples']}
sns.displot(data)
description = algname + ' / ' + row['variant']
for rt_axis in get_rt_axes(case_df):
title = "{}[{}]:".format(algname, ct_point_name)
df = case_df[case_df['variant'].str.contains(pattern, regex=True)].reset_index(drop=True)
num_rows = len(df)

fig, axes = plt.subplots(nrows=num_rows, ncols=1, gridspec_kw = {'wspace': 0, 'hspace': 0})
for id, row in df.iterrows():
description = row['variant']
for rt_axis in get_rt_axes(df):
description += ' / ' + rt_axis + '=' + row[rt_axis]
plt.title(description)
plt.show()
data = {description: row['samples'],
'base': row['base_samples']}
sns.histplot(data, ax=axes[id], kde=True)

for ax in axes.flat:
ax.set_xticklabels([])

fig.suptitle(title)
plt.tight_layout()
plt.show()



Expand Down

0 comments on commit e8dce77

Please sign in to comment.