在matplotlibrc中设置底部,顶部,左侧,右侧刻度线可见性 [英] Set bottom, top, left, right tick visibility in matplotlibrc
问题描述
此处是一个有关通过使用tick_params
方法.我想在 matplotlibrc
中将 top
和 right
属性默认设置为关闭,但是我不知道该怎么做,因为 matplotlibrc
文件的刻度部分处理 xtick
和 ytick
方面的事情.我错过了什么?
Here is a question about turning off the ticks on a given side of a set of axes by using the tick_params
method. I want to change the top
and right
properties to off by default in my matplotlibrc
but I don't see how that is to be done, as the ticks section of the matplotlibrc
file deals with things in terms of xtick
and ytick
. What am I missing?
推荐答案
在 matplotlib github 上搜索之后,我找到了我要找的东西:即将发布的 2.x 版分支,在我写这篇文章的时候,有 xtick.top
等,作为新 matplotlibrc 模板中的参数.
After sleuthing around on the matplotlib github, I found what I was looking for: the upcoming version 2.x branch, at the time I am writing this, has xtick.top
, etcetera, as parameters in the new matplotlibrc template.
所以答案是,在撰写本文时,该功能可能不适用于模板,并且@ user2927356的方法可能是我可以使用的,直到matplotlib 2.x出现.
So the answer is that at the time of this writing, that functionality may not be available for templates, and @user2927356's method may be all I can use until matplotlib 2.x comes out.
这篇关于在matplotlibrc中设置底部,顶部,左侧,右侧刻度线可见性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!