Matplotlib快速入門 - HeoLis - 博客園
一個很唯美的 matplotlib 網站,教授 散點圖,條形圖,函數積分圖等的基本繪製
https://www.cnblogs.com/linblogs/category/1303936.html
https://www.cnblogs.com/linblogs/tag/Pythonmatplotlib/
matplotlib 靠給定函數,輸入各種參數就可以得到你想實現的各種二維表圖
https://www.cnblogs.com/dengfaheng/p/12720431.html
https://blog.csdn.net/weixin_34613450/article/details/81633350
https://blog.csdn.net/brooknew/article/details/80254275
10分鐘教你用Python中的Matplotlib繪製多圖併合並展示
在指定的地方插入 註釋 和 文本。
https://blog.csdn.net/GreenHandCGL/article/details/79825536
matplotlib 一些細節:
matplotlib 設置圖形大小時 figsize 與 dpi 的關係 設置分辨率是 保存圖片的時候獲取高清大圖,其他地方沒用
https://mathpretty.com/10908.html
保存圖片
'''
plt.savefig()
裏面的參數說明: dpi : 使圖片變大,讓它更加清晰
facecolor = 'green' 保存圖片時可以設置背景色
'''
x4 = np.random.randn(50) # cumsum()作用是累加和
x5 = np.random.randn(50)
x6 = np.random.randn(50)
plt.plot(x4.cumsum(),c='r',linestyle='--',marker='o')
plt.plot(x5.cumsum(),c='y',linestyle='-.',marker='>')
plt.plot(x6.cumsum(),c='b',linestyle=':',marker='*')
plt.legend(['x1','x2','x3'])
'''保存在當前目錄下,設置的dpi(高清大圖)'''
plt.savefig('pic.jpg',dpi=500)
print("圖片保存成功")
保存的圖片不完整怎麼辦:https://blog.csdn.net/weixin_38314865/article/details/88633880
需要的顏色查詢 :https://blog.csdn.net/w576233728/article/details/86538060