I can't quite figure out how to ask my question properly. I am trying to set custom x,y ticks on a log-log plot. Following the answer here I did,
fig1, ax1 = plt.subplots()
ax1.plot([10, 100, 1000], [1,2,3])
ax1.set_xscale('log')
ax1.set_yscale('log')
ax1.set_xticks([20, 200, 500])
ax1.set_yticks([1, 2,3])
ax1.get_xaxis().set_major_formatter
(matplotlib.ticker.ScalarFormatter())
ax1.get_yaxis().set_major_formatter
(matplotlib.ticker.ScalarFormatter())
This results in an overlapping ticklabels on of the axis. Does anyone knows why is this happening?