Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib.pyplot as plt
- import numpy as np
- def average_line(data, plot_quartiles=True, color='#016d91'):
- averages = np.average(data,axis=0)
- x = np.arange(1, len(averages)+1)
- plt.plot(x, averages, color=color)
- if plot_quartiles:
- lower = np.percentile(accs, 25, axis=0)
- upper = np.percentile(accs, 75, axis=0)
- plt.fill_between(x, lower, upper, color=color, alpha='0.3', linewidth=0)
- plt.show()
Add Comment
Please, Sign In to add comment