Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Grouped bar chart with labels

fig, ax = plt.subplots(figsize=(12, 8))
x = np.arange(len(df.job.unique()))

# Define bar width. We'll use this to offset the second bar.
bar_width = 0.4

# Note we add the `width` parameter now which sets the width of each bar.
b1 = ax.bar(x, df.loc[df['sex'] == 'men', 'count'],
            width=bar_width)
# Same thing, but offset the x by the width of the bar.
b2 = ax.bar(x + bar_width, df.loc[df['sex'] == 'women', 'count'],
            width=bar_width)
Comment

PREVIOUS NEXT
Code Example
Python :: find location of a class in python 
Python :: matlab end of array 
Python :: gau mata 
Python :: install sort 
Python :: jhon wick 
Python :: how to count to 1billion in python 
Python :: how to use print statement in python 
Python :: numpy symmetrize array 
Python :: all possibilities of 0 and 1 
Python :: Show output of views in html using ajax, django 
Python :: xml to sqlite 
Python :: dont print pip jupyter 
Python :: Python Module Search Path 
Python :: pip set mirror site 
Python :: osmapi 
Python :: python decode errors schemes 
Python :: region python 
Python :: Customize tick spacing 
Python :: pairwiseclip arcpy 
Python :: different accuracy score for knn 
Python :: python datediff days 
Python :: auto clicker 
Python :: complete pipeline sample 
Python :: critical errors python 
Python :: add all columns in django 
Python :: pytorch plot batch 
Python :: how to access github folder in python code using github https link 
Python :: some problem occurred shows payubiz 
Python :: the 100th iteration in python next() 
Python :: monthly precipitation in python 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =