【发布时间】:2020-11-08 04:47:42
【问题描述】:
我只想通过 matplotlib 显示坐标轴或数据点坐标上的精确值 (x, y)。我在下面的工作
def plot_sample_individual(id = None):
if id is None:
id = random.randint(0, len(ca_the))
fig, ax = plt.subplots(1, 1, figsize=(5, 5))
ax.plot(week[:7], ca_the[id, :],'--ro')
ax.set_title('ID cá thể '+ str(ID[id, 0]))
ax.set_ylabel('Sản lượng trứng trung bình tuần')
ax.set_xlabel('Tuần')
代码的结果是:
如何在轴 y 上只显示 3 个值,在轴 x 上只显示 5 个值?
【问题讨论】:
-
exact values是什么意思?您想在 x 和 y 轴上显示哪些值? -
我想删除不是点坐标的值
标签: python matplotlib