How to reduce space between x-axis origin and y-axis origin in seaborn

Viewed 601

Can anyone tell me how to reduce space between x origin and y origin ,

kindly check out the image link , as im new to stack over flow , i dont have points to paste the image directly

sns.distplot(titanic['fare'],bins=30,kde=False,color='red')

enter image description here

1 Answers

You can set the x-axis left limit accordingly. For example, you can choose 0, or -5, -2, etc whichever gives you a desired figure

ax = sns.distplot(titanic['fare'],bins=30,kde=False,color='red')
ax.set_xlim(-2, None) # you can replace -2 with a value of your choice
Related