import matplotlib.pyplot as plt
plt.plot(x1 , y1 ,'1的參數(shù)' ,x2 ,y2 ,'2的參數(shù)')
plt.ylabel('對y軸注釋')
plt.show() # 展示圖像
plt.axis([a, b, c, d]) # 分別為x軸y軸的范圍
plt.scatter(x, y ,z) # 散點(diǎn)圖
plt.subplot(2, 1, 1) # 多個(gè)圖同時(shí)
plt.plot(x, y)
plt.subplot(2, 1, 2)
plt.plot(m, n)
plt.grid(True) # 格點(diǎn)
plt.title('title')
plt.text(x, y, 'text') #在x捣卤,y處插入文字
plt.ylim(a, b) # 設(shè)置y軸范圍
plt.annotate('文字', xy=(a, b)) #還有其他可選參數(shù)
屬性
作圖時(shí)的可選屬性.png