Fix wrong Histogram plotting using when matplotlib

This commit is contained in:
allegroai 2022-04-13 14:28:51 +03:00
parent c8c824815e
commit d25b0868b3

View File

@ -243,7 +243,7 @@ class PlotlyRenderer(Renderer):
horizontal = ( horizontal = (
abs(sum(heights[0] - heights[iii] for iii in range(len(heights)))) < tol abs(sum(heights[0] - heights[iii] for iii in range(len(heights)))) < tol
) )
if vertical and horizontal: if (vertical and horizontal) or (not vertical and not horizontal):
# Check for monotonic x. Can't both be true! # Check for monotonic x. Can't both be true!
x_zeros = [bar_props["x0"] for bar_props in trace] x_zeros = [bar_props["x0"] for bar_props in trace]
if all( if all(