Skip to content

Commit

Permalink
Fix bar charts with only 1 bar are not reported correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
clearml committed Oct 27, 2024
1 parent b7fb956 commit 05e4e2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clearml/utilities/plotlympl/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,15 +317,15 @@ 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:
self.plotly_fig["layout"]["bargap"] = bar_gap
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."
)

Expand Down

0 comments on commit 05e4e2e

Please sign in to comment.