📜  增加轴刻度 pyplot - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:23.365000             🧑  作者: Mango

代码示例1
x = [0,5,9,10,16]
y = [0,1,2,3,5]

x_ticks = np.arange(0, 16, 5)
plt.xticks(x_ticks)

y_ticks = np.arange(0, 5, 2)
plt.yticks(y_ticks)

plt.plot(x, y)