There is the issue in the code syntax of scatterplot it must be color_dict={1:'red',3:'green',2:'blue'} sns.scatterplot( data=df, x='Alcohol', y='Malic acid', hue='Class label', palette=color_dict )
There is the issue in the code syntax of scatterplot it must be
color_dict={1:'red',3:'green',2:'blue'}
sns.scatterplot(
data=df,
x='Alcohol',
y='Malic acid',
hue='Class label',
palette=color_dict
)