error bar plot python

Solutions on MaxInterview for error bar plot python by the best coders in the world

showing results for - "error bar plot python"
Giuseppe
17 Jan 2016
1x = [0,1,2,3,4,5]
2y = [3,2,4,5,1,5]
3yerr=[0.3,0.2,0.4,0.5,0.1,0.5]
4fig, ax = plt.subplots(figsize=(8,8))
5ax.errorbar(x, y, yerr=yerr, fmt='-o', color='k')
6ax.set_title('My title')
7ax.set_ylabel('My ylabel')
8ax.set_xlabel('My xlabel')
9plt.show()