python-繪製點(plt.scatter函數詳解)和直線(已經知道斜率和截距)

1、繪製點 plt.scatter函數參數意義,s參數表示點的面積,marker爲點的形式 參考:https://blog.csdn.net/m0_37393514/article/details/81298503 x和y爲數組 結果: 2、繪製直線 核心函數: plt.plot(x, yy, c=‘orange’) plt.title(‘liner regression’,fontsize=‘x
相關文章
相關標籤/搜索