Scatter Plot with Conditions Suppose I have a data frame

name = ['A', 'B', 'C'] 
score = [2,4,6] 


I want to create a scatter plot with the following conditions, color the bubble as green if the score is greater than 3 and red otherwise. I'd also like to label the bubble with its respective name.

I'm only able to create a scatter plot with the bubble having the respective name.
This type of scatter plot is best performed in seaborn for Python.

# example from: https://python-graph-gallery.com/?s=scatter
# library &amp; dataset
import seaborn as sns
df = sns.load_dataset('iris')

# Use the 'hue' argument to provide a factor variable
sns.lmplot( x="sepal_length", y="sepal_width", data=df, fit_reg=False, hue='species', legend=False)

# Move the legend to an empty part of the plot
plt.legend(loc='lower right')


The keyword hue will designate which variable is the one which is used for labeling the data points. Also, have a look at the link provided for more examples.