I want to make a scatter plot with python matplotlib where the color of the dot should correspond with a particular string from a data file, so something like this:
Something along these lines should do the trick:
color_dict = { 'Allan':'red', 'Betty':'blue', 'Chris':'black', 'Diane':'green','Eugene':'purple' } plt.scatter( data['a'], data['b'], color=[ color_dict[i] for i in data['c'] ] )