How do I add space between the ticklabels and the axes

If you don’t want to change the spacing globally (by editing your rcParams), and want a cleaner approach, try this:

ax.tick_params(axis="both", which="major", pad=15)

or for just x axis

ax.tick_params(axis="x", which="major", pad=15)

or the y axis

ax.tick_params(axis="y", which="major", pad=15)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)