我有以下代码来显示堆积条
handles = df.toPandas().set_index('x').T.plot(kind='bar', stacked=True, figsize=(11,11))
plt.legend(loc='best', title="Line", fontsize = 'small', framealpha=0)
plt.ylabel("'" + lineName + "'")
plt.show()
Run Code Online (Sandbox Code Playgroud)
我想颠倒我用过的传奇顺序,handles=handles[::-1]但是我收到了一个错误.