Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
Source by www.kite.com #
 
PREVIOUS NEXT
Tagged: #matplotlib #bar #chart #dictionary
ADD COMMENT
Topic
Name
4+7 =