Answers for "bar plot from dictionary 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

Python Answers by Framework

Browse Popular Code Answers by Language