I have coded a horizontal grouped bar plot using Python. My requirement is that I want to write the number associated with each bar alongside the bars. I have seen problems similar to this on the internet. But I am not sure how to carry out the task in my specific case where there are grouped bars. The following is my code:
# importing package
import matplotlib.pyplot as plt
import pandas as pd
# create data
df = pd.DataFrame([['A', 10, 20, 10, 30], ['B', 20, 25, 15, 25], ['C', 12, 15, 19, 6],
['D', 10, 29, 13, 19]],
columns=['Team', 'Round 1', 'Round 2', 'Round 3', 'Round 4'])
# view data
print(df)
# plot grouped bar chart
ax=df.plot.barh(x='Team',
stacked=False,
log=True,
title='Grouped Bar Graph with dataframe')