Guest User

Untitled

a guest
Nov 20th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2. import numpy as np
  3.  
  4. def average_line(data, plot_quartiles=True, color='#016d91'):
  5. averages = np.average(data,axis=0)
  6. x = np.arange(1, len(averages)+1)
  7. plt.plot(x, averages, color=color)
  8.  
  9. if plot_quartiles:
  10. lower = np.percentile(accs, 25, axis=0)
  11. upper = np.percentile(accs, 75, axis=0)
  12. plt.fill_between(x, lower, upper, color=color, alpha='0.3', linewidth=0)
  13. plt.show()
Add Comment
Please, Sign In to add comment