'Plot a groupby() df

I am having issues with correctly formatting a bar plot I have.

This is the code:

output = df.groupby(['Count: Compliant Module', 'Quintile', 'Rep Segment'])['Productivity Score', 'Activity', 'Attainment', 'Forecast Accuracy', 'Funnel', 'Training', 'Account Plan'].mean()
output.plot.bar(stacked = True)

Where it first groups by 'Count: Compliant Module' (either 0 or 1) Then it groups by quintile (1-5) Then it groups by segment (7 choices, some not present in the 0 group for first grouping)

I then stored the averages of 7 columns for each grouping and got this graph:

my graph

How I would like this graph to look is: Still stacked for the means of each measurement

Compliant bar next to Non-Compliant bar for each same rep segment and quintile

So Right now the left half of the graph is all segments and quintiles for non-compliant, right half is same but for compliant

Looking for tips on how to make this more understandable and coherent, possibly different color scheme for compliant vs non compliant. Any tips would be appreciated!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source