How to set a minimum bar width when using broken_barh?

I’m using broken_barh [1] to draw some bars on a graph. Everything is working as expected, accept… if the bar xwidth is too small a value then no bar gets drawn. How can I enforce that even if the xwidth is a very small value – e.g. 0.001 – that a minimum bar width – e.g. 1 or 2 – in pixels is drawn instead of nothing…?

Note: I tried massaging the xwidth value, e.g. by making it a bit bigger by a constant value. But this solution is unsatisfactory because how big it needs to be seems to be a factor of how wide the graph ends up.

[1] matplotlib.axes.Axes.broken_barh — Matplotlib 3.5.1 documentation

The easiest way to get this is to set a small linewidth + color which will control the edges of the rectangles.

The face of a polygon can effectively get anti-aliased out of existence (it is so much smaller than a pixel that it does not have a visible effect), and are sized in data units. For any size rectangle there is some data limits where the rectangle is too small to see. However, the edges of the polygons are stroked with a fixed width in screen space so no matter how small the polygons get the edge is always visible. Because we stroke centered on the edge of the polygon this makes everything bigger by 1/2 the linewidth. This can have positive effects (you want this to see your bars) or negative effects (if you really care exactly how big your polygons are).