matplotlib.pyplot

繪製子圖 plt.subplots()

Return FigureAxes 或 Axes 的 list

matplotlib.figure

fig.suptitle()

Add a centered super title to the figure.

axex. set_title() / set_xlabel() / set_ylabel()

設定標題、X 軸名稱、Y 軸名稱

折線圖 axes.plot()

plot([[x_0], y_0, [fmt_0]], [[x_1], y_1, [fmt_1], …], data=None, **kwargs)

  • 只有 Y 軸資料時,X 軸預設為 [0, 1, … , len(y_i) – 1]

散布圖 axes.scatter()

axes.axis() 取得/設定 軸的參數

axes.legend() 顯示軸的名稱

輸出 plt.show()

import matplotlib.pyplot as plt
...
plt.show()

 

Last Updated on 2023/08/16 by A1go

目錄
Bitnami