相关疑难解决方法(0)

反向传奇顺序熊猫情节

我有以下代码来显示堆积条

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]但是我收到了一个错误.

python matplotlib pandas

4
推荐指数
2
解决办法
3386
查看次数

标签 统计

matplotlib ×1

pandas ×1

python ×1