【发布时间】:2021-09-28 07:01:43
【问题描述】:
我正在尝试重命名 matplotlib 中的 yticks。
通过这些代码行,我得到了第一个数字。
from matplotlib import pyplot as plt
incr = -2
fig = plt.figure(figsize=(4,2))
ax = fig.add_subplot(111)
ax.set_yticks([])
yy = [[0.1, 0.2, 0.4], [0.2,0.3, 0.5], [0.4, 0.3, 0.5]]
for i in range(len(yy)):
incr += 2
xx = list(range(len(yy[i])))
xx = [x+incr for x in xx]
ax.plot(xx, yy[i])
ax.plot([incr,incr], [0,.3])
我怎样才能改变这个图中的xticks
【问题讨论】:
标签: python matplotlib axis-labels