如何使用MATPLOTLIB使数字脱粒

时间:2019-07-17 14:27:35

标签: python

我想这样做,以便代码仅查看图形中的特定区域。图表不会根据图表的线而变化。我知道有办法,但是我可以用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()

1 个答案:

答案 0 :(得分:0)

使用ylimxlim属性。