python中不同组的散点图,组内的变量应该有不同的颜色

问题描述

我想要在一张图中绘制三个散点图,在 ORI_PL& ORI_ML 之间绘制,其他组的类似。并且每组的标记是不同的。但是标记的颜色应该遵循左侧提到的颜色,我该怎么做?我写了代码,但无法为组内的每个人设置不同的颜色。

plt.scatter(sample_data.Image2,sample_data.ORI_PL,sample_data.ORI_ML,marker="o",c='gray')
plt.scatter(sample_data.Image2,sample_data.ORILOWER_PL,sample_data.ORILOWER_ML,marker="+",c='b'    )
plt.scatter(sample_data.Image2,sample_data.ORIHIGH_PL,sample_data.ORIHIGH_ML,marker ="_",c='r'   )
#palette['BLUE','YELLOW','GREEN','RED','ORANGE']
plt.xlabel("Physical luminance")
plt.ylabel("Matched luminance")
plt.show()

解决方法

enter image description hereenter image description here我可以在同一个图形中绘制 3 个图..但我希望每个组都有不同的标记,但是每个组中每个值的标记颜色应该不同.我想要附上图片数据中提到的颜色