From 15fc4a7693a12adfbab7e81d56182c9339676488 Mon Sep 17 00:00:00 2001 From: patrickjohncyh Date: Sun, 23 Jul 2023 14:44:08 +0800 Subject: [PATCH] cast labels to string as per matplotlib reuqiremnts --- reclist/reclist.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reclist/reclist.py b/reclist/reclist.py index 189b307..adf4151 100644 --- a/reclist/reclist.py +++ b/reclist/reclist.py @@ -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