title: Read file and plot CDF in Python
body: <p>I need to read long file with timestamp in seconds, and plot of CDF using numpy or scipy. I did try with numpy but seems the output is NOT what it is supposed to be. The code below: Any suggestions appreciated. </p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  data = np.loadtxt('Filename.txt')
  sorted_data = np.sort(data)
  cumulative = np.cumsum(sorted_data)
  
  plt.plot(cumulative)
  plt.show()
  </code></pre>