显示图像及画线
import numpy as np
import matplotlib.pyplot as plt
#####################1
x = np.linspace(-5, 5, 30) # X axis data
y = np.sin(x) * x ** 2 + 1
plt.figure()
plt.plot(x, y)
plt.scatter(x, y, c='r')
plt.savefig('d:/f1.png')
plt.figure(2)
plt.bar(x,y, yerr=np.random.normal(0,3, y.shape),width=0.2)
plt.bar(x, y, bottom= y,yerr=np.random.normal(0,3, y.shape), color='y',width=0.2)
plt.savefig('d:/f2.png')
plt.show()
marker options: