Skip to content

Commit

Permalink
cast labels to string as per matplotlib reuqiremnts
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickjohncyh committed Jul 23, 2023
1 parent d13f3d0 commit 15fc4a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions reclist/reclist.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ def _bar_chart(self, test_result: dict):
ax.set_ylabel('y')
ax.set_title(test_result['name'])
data = test_result['result'].keys()
# cast keys to string; matplotlib requirement
data = [str(_) for _ in data]
ax.bar(data, [test_result['result'][_] for _ in data])

return fig
Expand Down

0 comments on commit 15fc4a7

Please sign in to comment.