I have a uniform distribution that I would like to plot. I use px.histogram and expect to see a uniform distribution.
However, for some reason the distribution appears tapered at each end. It looks like while the values range from 0.00 - 1.00, there are bins at -0.05 - +0.05 and 0.95 - 1.05.
This behavior persists when specifying a range in update_layout, or specifying range_x in px.histogram. It also persists regardless of if you choose an even or odd number of bins. Here is an MRE:
import plotly.express as px
import scipy.stats as st
r = st.uniform.rvs(0, 1, size=1000)
px.histogram(r, nbins=12, range_x=[0, 1])
Hi Juan, this doesn’t answer the question - see how it’s still only half frequency at each end? They are around 50 vs around 100. it should be around 100 for each bar