How to increase the x-axis plot size in seaborn?

2k views Asked by At

I am trying to plot a graph using seaborn for different professions and I cannot identify the labels on the x-axis. Here's the image of the graph enter image description here

2

There are 2 answers

0
Manasa Maganti On

as @Karthik mentioned in the comment, I have tried rotating labels

ax = sns.countplot(x="Profession", data=df)

ax.set_xticklabels(ax.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()

This worked

0
Ankush Naik On

Just use:

plt.figure(figsize=(25,7) 
  • #25 is Width
  • #7 is Height

enter image description here