rotate catplot x labels code example
Example 1: seaborn rotate xlabels
plt.figure(figsize=(10,5))
chart = sns.countplot(
data=data[data['Year'] == 1980],
x='Sport',
palette='Set1'
)
chart.set_xticklabels(chart.get_xticklabels(), rotation=45)
Example 2: seaborn angle lable
chart = data[data['Year'] == 1980]['Sport'].value_counts().plot(kind='bar')
chart.set_xticklabels(chart.get_xticklabels(), rotation=45, horizontalalignment='right')