Note
Go to the endto download the full example code.
ecdf(x)#
Compute and plot the empirical cumulative distribution function of x.
Seeecdf.

importmatplotlib.pyplotaspltimportnumpyasnpplt.style.use('_mpl-gallery')# make datanp.random.seed(1)x=4+np.random.normal(0,1.5,200)# plot:fig,ax=plt.subplots()ax.ecdf(x)plt.show()