问题
I would like all of my plots to have ticks that point inside rather than the matplotlib default of outside. So I am looking for a way to set this using plt.rcparams()
For each plot, at the moment, I am doing:
ax.tick_params(direction='out')
But this only works for a single plot. Any idea how to set this with a default plot style at the top of the script or through plt.style.use()?
回答1:
Reading the rcParams helps:
plt.rcParams["xtick.direction"] = "out"
plt.rcParams["ytick.direction"] = "out"
来源:https://stackoverflow.com/questions/57719124/how-to-set-default-tick-params-in-python-matplotlib