交互式绘制matplotlib时缓慢的控制台输入

时间:2015-06-25 09:21:20

标签: windows performance python-2.7 matplotlib console

我想在控制台中输入一些内容,然后立即更新图形。因此我使用pylab交互模式。但是,在输入输入时,Windows控制台会以较短的时间延迟响应,就像交互式绘图使用了太多内存一样。

有没有办法避免这种减速效果?

import pylab as plt
plt.ion() #░interactive mode on
plt.plot([1,2,3])
plt.draw()
while True:
    test=str(raw_input('Type something fast and observe the delay\n: '))

0 个答案:

没有答案