import numpy as np import matplotlib.pyplot as plt a = [1,2,3,4,5,6] b = [3,8,5,4,5,8] c = np.array([3,4,5]) d = np.array([2,4,6]) plt.plot(a,b,'r-') #折线图 plt.plot(c,d,'r--',lw=10) #lw为线条宽度 plt.bar(a,b,0.5,alpha=0.5,color='b') # 5 颜色 4 透明度 3 柱宽度 plt.show()