pandasを使うならこんな感じですかね
Python
1import pandas as pd
2import matplotlib.pyplot as plt
3
4df = pd.DataFrame({'Sample No.':[1,2,3,4,5,6],
5 'Black':[30,45,10,15,40,30],
6 'Green': [20,30,60,40,45,45],
7 'Red': [50,25,30,45,15,25]})
8df = df.set_index('Sample No.')
9ax = plt.subplot()
10df.plot.bar(stacked=True, color=['black', 'green', 'red'], ax=ax)
11ax.set_ylabel('Rate')
12plt.show()

追記
Python
1import pandas as pd
2import matplotlib.pyplot as plt
3
4df = pd.DataFrame({'Sample No.':[1,2,3,4,5,6],
5 'Black':[30,45,10,15,40,30],
6 'Green': [20,30,60,40,45,45],
7 'Red': [50,25,30,45,15,25]})
8df['Pos'] = [0,1,3,4,6,7]
9
10ax = plt.subplot()
11ax.bar(x=df['Pos'], height=df['Red'], bottom=0, color='red', label='Red')
12ax.bar(x=df['Pos'], height=df['Green'], bottom=df['Red'], color='green', label='Green')
13ax.bar(x=df['Pos'], height=df['Black'], bottom=df['Red']+df['Green'], color='black', label='Black')
14
15ax.set_xticks(df['Pos'])
16ax.set_xticklabels(df['Sample No.'])
17ax.set_xlabel('Sample No.')
18ax.set_ylabel('Rate')
19ax.legend()
20plt.savefig('out2.png')
21plt.show()

バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/01/12 03:14
退会済みユーザー
2020/01/12 03:15
2020/01/12 04:04
2020/01/12 04:14
退会済みユーザー
2020/01/12 04:24