如何在 python/matplotlib 中设置默认刻度参数? [英] How to set default tick params in python/matplotlib?

查看:63
本文介绍了如何在 python/matplotlib 中设置默认刻度参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望我所有的图都具有指向内部的刻度线,而不是外部的matplotlib默认值.所以我正在寻找一种方法来设置它使用 plt.rcparams()

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')

但这仅适用于单个图.知道如何使用脚本顶部的默认绘图样式或通过plt.style.use()进行设置吗?

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()?

推荐答案

阅读

这篇关于如何在 python/matplotlib 中设置默认刻度参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆