[ Web Proxy ]
URL:
Viewing: https://matplotlib.org/stable/api/_as_gen/../../plot_types/unstructured/../stats/ecdf.html [Back]  [Original]

ecdf(x) — Matplotlib 3.11.2 documentation
Back to top
Search the docs ...:

ecdf(x)#

Compute and plot the empirical cumulative distribution function of x.

See ecdf.

ecdf [ecdf]
import matplotlib.pyplot as plt
import numpy as np

plt.style.use('_mpl-gallery')

# make data
np.random.seed(1)
x = 4 + np.random.normal(0, 1.5, 200)

# plot:
fig, ax = plt.subplots()
ax.ecdf(x)
plt.show()

Gallery generated by Sphinx-Gallery


Web Proxy Viewer  |  New URL  |  Original Page