【发布时间】:2018-05-23 16:46:22
【问题描述】:
在这个例子中:
import matplotlib.pyplot as plt
colors = ['white', 'orange', 'green', 'purple']
rates = ['5','5','4','3']
plt.bar(colors, rates)
图中的条形按字母顺序排列。
如何让它们以与代码中相同的顺序显示(从最高到最低的比率)?
【问题讨论】:
标签: python matplotlib plot anaconda histogram