I'm making scatterplots out of a DF using matplotlib. In order to get different colors for each data set, I'm making two separate calls to plt.scatter:
plt.scatter(zzz['HFmV'], zzz['LFmV'], label = dut_groups, color = 'r' ) plt.scatter(qqq['HFmV'], qqq['LFmV'], label = dut_groups, color = 'b' ) plt.legend() plt.show()
This gives me the desired color dependence but really what would be ideal is if I could just get pandas to give me the scatterplot with several datasets on the same plot by something like
df.plot(kind = scatter(x,y, color = df.Group, marker = df.Head)
Apparently there is no such animal (at least that I could find). So, next best thing in my mind would be to put the plt.scatter calls into a loop where I could make the color or marker vary according to one of the rows (not x or y, but some other row. If the row I want to use were a continuous variable it looks like I could use a colormap, but in my case the row I need to sue for this is a string ( categorical type of variable, not a number).
Any help much appreciated.