3

I am trying to so a countplot using seaborn of this dataframe :

ax = sns.countplot(x="OPP_SOURCE", hue="target", data=df)

plt.show()

So as you see in the image the value of X axis are not clear any help?

thank you

enter image description here

Nasri
  • 525
  • 1
  • 10
  • 22
  • Possible duplicate of [How do I change the figure size for a seaborn plot?](https://stackoverflow.com/questions/31594549/how-do-i-change-the-figure-size-for-a-seaborn-plot) – Diziet Asahi Jul 17 '18 at 13:56

1 Answers1

3

You should try the following:
1. rotate the x-axis labels
2. change aspect ratio by specifying size and aspect. The default aspect is 1, but try changing to 2.

ax = sns.countplot(x="OPP_SOURCE", hue="target", data=df, size=4, aspect = 2)
ax.set_xticklabels(rotation=30)
plt.show()
Kevin Wood
  • 46
  • 3