我需要在图表上绘制很多 X,但有没有办法不必直接指定颜色?

I need to plot a lot of X's on a graph, but is there a way to not have to directly specify the color?

我必须在图表上绘制这些 x,但是有没有办法不需要指定颜色? 我只是画了几个作为例子,但是我有具体的坐标。

plt.plot(324,66,'x',color='red',markersize=10)
plt.plot(322,65.5,'x',color='blue',markersize=10)
plt.plot(318,63,'x',color='green',markersize=10)
plt.plot(319.5,65,'x',color='purple',markersize=10)
plt.show()

例如,我尝试使用颜色图进行迭代并通过创建数组来指定坐标,但它与正确的位置不匹配:

x1 = 324,66
x2 = 322,65.5
x3 = 319.5,65
x4 = 318,63

points = np.stack((x1,x2,x3,x4))

color= matplotlib.cm.magma(np.linspace(0,1,4))
for i,c in zip(range(4),color):
    plt.plot(points[i],'x')
plt.show()

我可能做错了什么? 我必须绘制很多 X,所以我不想指定颜色。

尝试使用 seaborn 并使用 hue 参数:

x1 = 324,66
x2 = 322,65.5
x3 = 319.5,65
x4 = 318,63
df = pd.DataFrame((x1,x2,x3,x4), columns= ['x', 'y'])
sns.pointplot(x = 'x', y ='y' , data = df , hue = df.index, markers= '*')

输出: