您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

Python-有没有办法分离matplotlib图,以便继续计算?

Python-有没有办法分离matplotlib图,以便继续计算?

使用matplotlib不会阻塞的呼叫:

使用draw()

from matplotlib.pyplot import plot, draw, show
plot([1,2,3])
draw()
print 'continue computation'

# at the end call show to ensure window won't close.
show()

使用交互模式:

from matplotlib.pyplot import plot, ion, show
ion() # enables interactive mode
plot([1,2,3]) # result shows immediatelly (implicit draw())

print 'continue computation'

# at the end call show to ensure window won't close.
show()
python 2022/1/1 18:17:37 有490人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶