I can easily make a CDF in Matplotlib by using a cumulative histogram:
data = np.linspace(0, 100, num=10000)
plt.hist(data, cumulative=True, density=1)
And the result is this:
I can crank up the bin count to get a better approximation:
plt.hist(data, bins=50, cumulative=True, density=1)
Now the result is:
This is still not great. I know I can just make the bin count even higher, but that's a pretty unsatisfying solution for me.
Is there a way to plot a CDF that doesn't make me lose some precision? Like a binless histogram or something else?