Answers for "plot a bar chart of items in dictionary in python"

0

matplotlib bar chart from dictionary

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)
Posted by: Guest on June-13-2021

Code answers related to "plot a bar chart of items in dictionary in python"

Python Answers by Framework

Browse Popular Code Answers by Language