Python 在matplotlib中做更长的子批次记号?

Python 在matplotlib中做更长的子批次记号?,python,matplotlib,subplot,Python,Matplotlib,Subplot,我试图沿着python多通道子地块的轴改变记号标记。我有两个共用一个x轴的面板。我已经使绘图周围的边界变厚,并且使沿轴的所有记号变厚。我有两个问题: 如何使所有记号(两个轴)变长,使它们更可见 如何在主要记号之间添加较小但仍然可见的记号 这是我到目前为止所拥有的最基本的工作示例 from numpy import * from scipy import * from pylab import * from random import * import pylab import matplotli

我试图沿着python多通道子地块的轴改变记号标记。我有两个共用一个x轴的面板。我已经使绘图周围的边界变厚,并且使沿轴的所有记号变厚。我有两个问题:

如何使所有记号(两个轴)变长,使它们更可见

如何在主要记号之间添加较小但仍然可见的记号

这是我到目前为止所拥有的最基本的工作示例

from numpy import *
from scipy import *
from pylab import *
from random import *
import pylab
import matplotlib.pyplot as plt


#make the axis border thick
pylab.rc("axes", linewidth=4.0)
pylab.rc("lines", markeredgewidth=4)


#create a figure with two panels that shares the x-axis
f, (ax1, ax2) = plt.subplots(2, sharex=True, sharey=False)
#example figure1
ax1.plot(range(2),range(2),linewidth=2)
#example figure 2
ax2.plot(range(2),range(2),linewidth=2)



# Fine-tune figure; make subplots close to each other and hide x ticks for
# all but bottom plot.
f.subplots_adjust(hspace=0)
plt.setp([a.get_xticklabels() for a in f.axes[:-1]], visible=False)
show()
请尝试以下操作:

#example figure1
ax1.plot(range(2),range(2),linewidth=2)
ax1.minorticks_on()
ax1.tick_params('both', length=20, width=2, which='major')
ax1.tick_params('both', length=10, width=1, which='minor')

您可以对ax2重复相同的操作。这对您有用吗?

如何获得轴的可用参数列表。勾选参数()?@Atcold它们在文档中