我创建了一个组合条形图,无法按行着色。我尝试了色调、颜色、调色板、库的所有组合,但没有成功。我的代码是:
fig, axes=plt.subplots(1,5,figsize=(11,8))
my_new_color={'UA':'white','AA':'blueviolet','US':'#98F5FF',
'F9':'#FF9912','B6':'#66CD00','OO':'green','AS':'#3D59AB','NK':'black',
'WN':'red','DL':'yellow','EV':'#98F5FF','HA':'#FFF8DC','MQ':'#7FFF00',
'VX':'pink'}
sns.boxplot(ax=axes[0],y='AIR_SYSTEM_DELAY', data=ARL_DA_reason3,linewidth=1, width=0.55)
sns.stripplot(ax=axes[0],y='AIR_SYSTEM_DELAY', data=ARL_DA_reason3, size=10, color='yellow')
sns.boxplot(ax=axes[1], data=ARL_DA_reason3, y='SECURITY_DELAY',linewidth=1, width=0.55)
sns.stripplot(ax=axes[1],y='SECURITY_DELAY', data=ARL_DA_reason3, color='yellow',size=10)
sns.boxplot(ax=axes[2], data=ARL_DA_reason3, y='AIRLINE_DELAY',linewidth=1, width=0.55)
sns.stripplot(ax=axes[2],y='AIRLINE_DELAY', data=ARL_DA_reason3, color='yellow',size=10)
sns.boxplot(ax=axes[3], data=ARL_DA_reason3, y='LATE_AIRCRAFT_DELAY',linewidth=1, width=0.55)
sns.stripplot(ax=axes[3],y='LATE_AIRCRAFT_DELAY', data=ARL_DA_reason3, color='yellow',size=10)
sns.boxplot(ax=axes[4], data=ARL_DA_reason3, y='WEATHER_DELAY',linewidth=1, width=0.55)
sns.stripplot(ax=axes[4],y='WEATHER_DELAY', data=ARL_DA_reason3, color='yellow',size=10)
![enter image description here](https://i.stack.imgur.com/cCPGN.png)
![enter image description here](https://i.stack.imgur.com/Bc1wT.png)