您可以使用
tick_params(http://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes.tick_params)将刻度长度设置为0
:
fig = plt.figure()ax = fig.add_subplot(111)ax.plot([1],[1])ax.tick_params(axis=u'both', which=u'both',length=0)plt.show()

您可以使用
tick_params(http://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes.tick_params)将刻度长度设置为0
fig = plt.figure()ax = fig.add_subplot(111)ax.plot([1],[1])ax.tick_params(axis=u'both', which=u'both',length=0)plt.show()