I need to create a plot using pyplot where I can color markers based on the first index level in the DataFrame (df). Example: All values under: A -- Red, B -- Green, C -- Blue I'm plotting a1, a2, a3, a4, a5 against cat2 values. Every value should be on the same plot.
I can do it using subplots by using cross section:
f, a = plt.subplots(3,1)
df.xs('A').plot(ax=a[0])
df.xs('B').plot(ax=a[1])
df.xs('C').plot(ax=a[2])
Subplot lets me color different xs, but I need a way to do it on the same plot. Link is an image of my dataframe in csv