From 05e4e2eb4a8e3846cf75f8824df3de1a87d0c160 Mon Sep 17 00:00:00 2001 From: clearml <> Date: Sun, 27 Oct 2024 22:07:01 +0200 Subject: [PATCH] Fix bar charts with only 1 bar are not reported correctly --- clearml/utilities/plotlympl/renderer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clearml/utilities/plotlympl/renderer.py b/clearml/utilities/plotlympl/renderer.py index c0d13d2c..99887592 100644 --- a/clearml/utilities/plotlympl/renderer.py +++ b/clearml/utilities/plotlympl/renderer.py @@ -317,7 +317,7 @@ def draw_bar(self, coll, name=None): ) # TODO ditto if name: bar["name"] = name - if len(bar["x"]) > 1: + if len(bar["x"]) >= 1: self.msg += " Heck yeah, I drew that bar chart\n" self.plotly_fig['data'].append(bar) if bar_gap is not None: @@ -325,7 +325,7 @@ def draw_bar(self, coll, name=None): else: self.msg += " Bar chart not drawn\n" warnings.warn( - "found box chart data with length <= 1, " + "found box chart data with length < 1, " "assuming data redundancy, not plotting." )