I'm creating multiple subplots (bar charts) from pandas dataframe. I would like the two bars in each plot to have different colours (so that one is always eg. orange, and the other always blue).
My original dataframe looks like that:
Triplet sequence 3 4
0 AAA 78.415603 98.189959
1 AAC 85.606777 98.792146
2 AAG 85.229351 97.165199
3 AAT 78.397072 99.430332
4 ACA 85.413897 98.212358
.. ... ... ...
59 TGT 85.516804 98.094537
60 TTA 78.197088 99.040233
61 TTC 85.347600 98.243830
62 TTG 85.546867 98.017210
63 TTT 78.257015 99.585926
Then, I'm using a transpose to get this:
df2 = df.set_index('Triplet sequence').T
[64 rows x 3 columns]
Triplet sequence AAA AAC AAG AAT ACA \
3 78.415603 85.606777 85.229351 78.397072 85.413897
4 98.189959 98.792146 97.165199 99.430332 98.212358
Eventually, my code for barcharts is:
bar = df2.plot(kind='bar' ,
stacked=False,figsize = (20,40),
title='Grouped Bar Graph with dataframe',
subplots = True, layout=(16,4), legend = False, sharey = True ,
fontsize = 5, ylim = (95,100), color=[['C0','C1']] )
Then I get an error: Invalid color ['C0', 'C1']. How can I specify color parameter so I get different color for each bar representing a row in my dataframe?
Thank you!

