From aa178628a88c00c3506256ecf63f8d8d57e3a552 Mon Sep 17 00:00:00 2001 From: Ben Hambrecht Date: Fri, 20 Apr 2018 08:48:16 +0200 Subject: [PATCH] fixed drawing bars of height 0 --- active_projects/eop/histograms.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/active_projects/eop/histograms.py b/active_projects/eop/histograms.py index 01d1c356..21bae127 100644 --- a/active_projects/eop/histograms.py +++ b/active_projects/eop/histograms.py @@ -126,6 +126,10 @@ class Histogram(VMobject): stroke_width = self.bar_stroke_width, stroke_color = self.stroke_color, ) + if bar.height == 0: + bar.height = 0.01 + bar.generate_points() + t = float(x - self.x_min)/(self.x_max - self.x_min) bar_color = interpolate_color( self.start_color,