我想手动给点分配颜色。就像point1应该是深蓝色,point 2应该是浅蓝色,point 3应该是浅蓝色,我该如何在seaborn中做到这一点。谢谢
import seaborn as sns
import pandas as pd
d = {'OS_Packages':[0,1,2,4],'Vulnerabilities': [6,7,3,7],'text':['point1','point2','point3','point4']}
df = pd.DataFrame(d)
p1 = sns.relplot(x='OS_Packages',y='Vulnerabilities',data=df )
ax = p1.axes[0,0]
for idx,row in df.iterrows():
x = row[0]
y = row[1]
text = row[2]
ax.text(x+.05,y,text,horizontalalignment='left')