Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cadrev/5578063bda418ffa599a to your computer and use it in GitHub Desktop.
Save cadrev/5578063bda418ffa599a to your computer and use it in GitHub Desktop.
import numpy as np
import matplotlib.pyplot as plt
data = np.random.randn(100)
data = np.sort(data)
cdf = (np.arange(len(data))+1.0)/len(data)
'''C.D.F.
C.D.F. is the number of points smaller then the current value.
For each value in the data, increment up by 1/len(data).
'''
plt.figure()
plt.plot(data, cdf)
plt.show()
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment