I would like to change color of individual subplot:
1. Specifying desired color of plots by hand
2. Using random colors
Basic code (taken from 1)
df = DataFrame(np.random.randn(1000, 4), index=ts.index, columns=list('ABCD'))
df = df.cumsum()
df.plot(subplots=True)
plt.legend(loc='best')
plt.show()
I tried this:
colors = ['r','g','b','r'] #first option
colors = list(['r','g','b','r']) #second option
colors = plt.cm.Paired(np.linspace(0,1,4)) #third option
df.plot(subplots=True, color=colors)
But all of them doesn' work. I found 2 but I'm not sure how to change this:
plots=df.plot(subplots=True)
for color in plots:
??????


