Marker函數是Matplotlib庫中用來繪制散點圖中點的形狀的函數,可以通過設置參數來改變marker點的大小。可以使用參數s來設置marker的大小。例如,設置s=100會使marker點變大。以下是一個示例代碼:
import matplotlib.pyplot as plt
x = [1, 2, 3, 4, 5]
y = [5, 4, 3, 2, 1]
plt.scatter(x, y, marker='o', s=100)
plt.show()
在上面的代碼中,我們使用scatter函數來繪制散點圖,設置marker為圓形,并將s參數設置為100,使marker點變大。在實際使用中,可以將s設置為一個變量,并使用for循環來改變marker的大小。