Python 当我增加框架厚度时,信号灯消失了

Python 当我增加框架厚度时,信号灯消失了,python,matplotlib,Python,Matplotlib,在我以以下方式增加框架厚度之后 import numpy as np import matplotlib.pyplot as plt fig=plt.figure('Figure',figsize=(20,20)) ax=fig.add_subplot(111) for axis in ['top','bottom','left','right']: ax.spines[axis].set_linewidth(7) X=np.linspace(0.,10.,100) Y=np.lins

在我以以下方式增加框架厚度之后

import numpy as np
import matplotlib.pyplot as plt
fig=plt.figure('Figure',figsize=(20,20))
ax=fig.add_subplot(111)
for axis in ['top','bottom','left','right']:
    ax.spines[axis].set_linewidth(7)

X=np.linspace(0.,10.,100)
Y=np.linspace(0.,10.,100)
ax.plot(X,X,linewidth=6)
ax.tick_params(labelsize=70,pad=30)
plt.show()

您可以看到,在绘图中,不可能再看到帧上的信号灯指示每个值的精确位置。
如何选择信号灯的尺寸?

您还可以通过设置
tick_参数()

ax.tick_参数('both',长度=20,宽度=7)