Search
 
SCRIPT & CODE EXAMPLE
 

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)
Comment

PREVIOUS NEXT
Code Example
Python :: sns title 
Python :: check python version mac 
Python :: print traceback python 
Python :: migrate skip in django 
Python :: python iterate list reverse 
Python :: update numpy in python 
Python :: how to find geometric mean in python 
Python :: pandas dropna specific column 
Python :: save plot as image python 
Python :: python hashlib.sha512() 
Python :: how to fillna in all columns with their mean values 
Python :: export file csv 
Python :: read shp in python 
Python :: generate a color python 
Python :: python strip non numeric in string 
Python :: timeout exception in selenium python 
Python :: DeprecationWarning: executable_path has been deprecated, please pass in a Service object 
Python :: python except error as e 
Python :: check if a number is perfect cube in python 
Python :: how to make my jupyter prin full array 
Python :: pyspark import f 
Python :: alias python in macbook 
Python :: numpy for data science 
Python :: how to remove text in brackets of python 
Python :: pandas empty dataframe with column names 
Python :: python show interpreter path 
Python :: perfect number in python 
Python :: plot function in numpy 
Python :: tkinter change label text color 
Python :: random pick any file from directory python 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =