Fixed bug with rectangles not added through plt.bar. Kudos to Matteo Iannizzotto for the catch