I have a problem. I have a dataframe df
. I want to plot a scatterplot with the help of seaborn. But I want to change the x- axis. I would like the x-axis to be finer from 4.0 to 5.0. The distances should be smaller, e.g. 4.1, 4.2 or even finer.
How can I set so that the x-axis is displayed finer, so that I can see the values from 4.0 better?
I looked at seaborn, pylab - changing xticks from float to int , How to change the X axis range in seaborn in python?
d = {'review_scores_accuracy': [1.1, 2.0, 4.5, 5.0, 4.9, 4.8, 4.7],
'review_scores_rating': [1.1, 2.0, 4.6, 3.9, 4.2, 4.5, 4.2]}
df = pd.DataFrame(data=d)
fig, ax = plt.subplots(figsize=(20,10))
sns.scatterplot(data=df, x="review_scores_rating", y="review_scores_accuracy", ax = ax )
# ax.set_xlim(1,5)
# ax.set_xticks(1,2,3,4,4.1,4.2)
plt.show()