How to sort the values on x axis in an ascending order in a scatter plot?
fig, ax = plt.subplots()
fig.set_size_inches(18, 8)
ax.scatter(data=ipl,x='budget',y='player')
n = 4
for idx, label in enumerate(ax.xaxis.get_ticklabels()):
if idx % n != 0:
label.set_visible(False)
In the image,the values on x axis are randomly arranged.