An issue that arises when plotting histograms of discrete data with Matplotlib seems to also come up in distplot as well. That is, there are often empty bins in the histogram that are entirely artifacts of the plot. See here for an example with Poisson data:
Is there any way that distplot could try to detect this and adjust the bins automagically?
I think the problem here is that the binsize is < 1? I guess there could be a check for integer type in the input that makes the minimum binsize 1?
Twitter conversation made me remember this.
Last I thought about it, I wasn't sure that changing behavior depending on whether the input data were int or float was the best way to go. a) I can't think of anywhere else that is important in seaborn, so it's less predictable. b), Numeric pandas data often end up as object-typed for one reason or another (also this is what you have to do if you want integers with missing data, right?) So figuring out how to define "integer data" might be tricky.
Perhaps a different option would be to make it easier to define the bins in this case? Maybe let bins take a (min, max, n) tuple that gets passed to np.linspace to save some typing? Or (min, max, [n]) where n is a sensible default (probably the default reference rule, so that wouldn't help you with discrete data).
I have exactly the same problem. The problem is certainly not that some bins are zero. The placement of the bars seems to be non-deterministic.

yes you need to do bins=np.arange(data.min(), data.max() + 1)
Closed with #2125:
x = np.random.poisson(10, size=1000)
sns.histplot(x, discrete=True)

Thanks @mwaskom!
Most helpful comment
yes you need to do
bins=np.arange(data.min(), data.max() + 1)