x = MultipleLocator(10) # x轴每10一个刻度
y = MultipleLocator(15) # y轴每15一个刻度
# 设置刻度间隔
ax = plt.gca()
ax.xaxis.set_major_locator(x)
ax.yaxis.set_major_locator(y)
matplotlib 设置坐标轴刻度
猜你喜欢
转载自blog.csdn.net/qq_38251616/article/details/127646093
今日推荐
周排行