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

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