我想这样做,以便代码仅查看图形中的特定区域。图表不会根据图表的线而变化。我知道有办法,但是我可以用Matplotlib找到它。
xl = len(x)
zlx = int(xl) + 1
x.append(zlx)
y22 = current_stock # Other parts of my code
y.append(y22)
plt.plot(x, y, linewidth = 2,
marker='o', markerfacecolor='blue', markersize=7)
# Here I want is so that the y is constant
plt.draw()
plt.pause(1)
plt.clf()