python中引用matplotlib畫圖的幾個常用命令及基本步驟

①引包:import matplotlib.pyplot as plt; ②創建畫布:fig = plt.figure(); ③添加分區:ax = fig.add_subplot(311)  #三個數字分別代表行、列及本圖所處位置; ④ax..axis([-5,5,0,1])  #設置x軸最小、最大值,y軸最小、最大值; ⑤ax.scatter(xcord1,ycord1, s=30, c='re
相關文章
相關標籤/搜索