📜  字典中的 matplotlib 条形图 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:57.456000             🧑  作者: Mango

代码示例1
a_dictionary = {"a": 1, "b": 2, "c": 3}
keys = a_dictionary.keys()
values = a_dictionary.values()

plt.bar(keys, values)
# plots bar chart of keys (x) against values (y)