How can scatter plot color be looped? my code:
col = {'Male':'green','Female':'blue'}
gender = [‘Male’,’Female’,’Male’,’Male’,’Female’, …]
Matched_Days = [list of days…]
Marital_Status = [list of statuses…]
for type in gender:
plt.scatter(Marital_Status, Matched_Days, c=col[type])
I only get one color: blue because last gender is ‘female’ in list.
For some reason, I can't get it to loop and register all colors inside the dictionary