1

I am trying to create a grouped bar chart with labels, not with a label box and colored bars. I am trying to do it with matplotlib as follows.

# 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'])
  
# plot grouped bar chart
df.plot(x='Team',
        kind='bar',
        stacked=False,
        title='Grouped Bar Graph with dataframe')

I got the next barchart:

enter image description here

but I would like to get the bars grouped with a single color by group, and I would like to get each bar with its corresponding label, without the labels box. I do not know how to do it

d.b
  • 32,245
  • 6
  • 36
  • 77

0 Answers0