Seaborn barplot Employees exit surveys

Screen Link:
I want to order the values of age in ascending order, tried using the order parameter w order=[20,21,26,31,36,41,46,51,56] the plot is blank, tried using sort_values on columns,still blank.
Has anyone seen this before? thanks

My Code:

fig=plt.figure(figsize=(10,6))
sns.set_style('whitegrid')
ax=sns.barplot(x='age',
               y='dissatisfied',
               hue='service_cat',               
               data=combined_update,
              ci=None)
plt.legend(loc='upper right')

What I expected to happen:

What actually happened:

Replace this line with the output/error

hey @neilgordonwalker

I have a different dataframe called “combined_addex” in place of combined. And the age column for me has intervals rather than years. I only added the order parameter to your code and it shows me the plot.

Here’s the code:

fig=plt.figure(figsize=(10,6))
sns.set_style('whitegrid')
ax=sns.barplot(x='age',
               y='dissatisfied',
               hue='service_cat',               
               data=combined_addex,
               ci=None,
               order = combined_addex["age"].sort_values().unique())
plt.legend(loc='upper right') 

Here’s the plot:
image

If this doesn’t work, please use df.to_csv("df.csv") command on combined “dataframe” and upload that “.csv” file. Will use your own dataframe to work on the code.