import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
error = np.random.randn(10)
print(error)
x = np.arange(10)
y = pd.Series(np.sin(x))
print(y)
y.plot(yerr=error)
plt.show()
[-1.14921952 -0.67412246 1.31875635 -1.2853136 0.38329709 0.46545373
0.28505468 2.84261091 1.44255044 2.16625766]
0 0.000000
1 0.841471
2 0.909297
3 0.141120
4 -0.756802
5 -0.958924
6 -0.279415
7 0.656987
8 0.989358
9 0.412118
dtype: float64