import numpy as np from matplotlib import pyplot as plt x = np.arange(10) y = x + 5 plt.plot(x, y, '①', markersize=30) plt.show()
①处内容是*
语句x = np.arange(10)中的10表示星星的数量
语句plt.plot(x, y, '*', markersize=30)中的markersize表示星星的大小
语句x = np.arange(10)可以用x = int(range(10))替换