Is a there a step value parameter in sns.scatterplot( ) function?

36 Views Asked by At

I used sns.scatterplot() function to find relationship between City mileage and price of cars dataset but in the y axis the limits are all collapsed and I couldn't find the proper limit in y axis.

I tried using

plt.ylim(0,700000,100000)

but that didnt workout either. This is my code:

#Scatter plot to find relationship between price and city mileage
from matplotlib import ticker
plt.figure(figsize=(15,12))
sns.scatterplot(data = df, x = 'city_mileage', y = 'ex_showroom_price', hue = 'body_type', palette='viridis', s = 100)
plt.title("Relation between price and city mileage")
plt.xticks(fontsize=13)
plt.yticks(fontsize=13)
plt.xlim(0,40)
#plt.ylim(0,700000,100000)
plt.xlabel( 'city_mileage')
plt.ylabel('ex_showroom_price')
plt.show()

This is my output: enter image description here

0

There are 0 best solutions below