Skip to content

Commit

Permalink
Labels for plot
Browse files Browse the repository at this point in the history
  • Loading branch information
gevtushenko committed May 2, 2023
1 parent 24fcb7e commit 9d78e49
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions benchmarks/scripts/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,16 +234,26 @@ def extract_horizontal_space(df):
data = {description: row['samples'],
'base': row['base_samples']}

vertical_id = vertical_axis_ids[row[vertical_axis_name]]
vertical_val = row[vertical_axis_name]
vertical_id = vertical_axis_ids[vertical_val]
vertical_name = "{}={}".format(vertical_axis_name, vertical_val)

if len(horizontal_axes) > 0:
horizontal_point = []
for rt_axis in horizontal_axes:
horizontal_point.append("{}={}".format(rt_axis, row[rt_axis]))
horizontal_id = horizontal_axis_ids[" / ".join(horizontal_point)]
sns.histplot(data, ax=axes[vertical_id, horizontal_id], kde=True)
horizontal_name = " / ".join(horizontal_point)
horizontal_id = horizontal_axis_ids[horizontal_name]
ax=axes[vertical_id, horizontal_id]
if vertical_id == (num_rows - 1):
ax.set_xlabel(horizontal_name)
if horizontal_id == 0:
ax.set_ylabel(vertical_name)
else:
sns.histplot(data, ax=axes[vertical_id], kde=True)
ax=axes[vertical_id]
ax.set_ylabel(vertical_name)

sns.histplot(data, ax=ax, kde=True)

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

0 comments on commit 9d78e49

Please sign in to comment.