matplotlib绘制什么都不显示 [英] matplotlib draw showing nothing
问题描述
我正在使用python的matplotlib通过轮廓和轮廓函数来绘制一些轮廓.使用show时它们都可以正常工作,但是当我尝试在方法中使用draw()时,我得到了matplotlib窗口,但没有图形.show()调用将在代码上以更晚的方式执行,并以不同的方法进行,我想在用draw()完成时显示一个图,而不必等到更晚的show().我做错了什么?
I'm using python's matplotlib to do some contours using contour and contourf functions. They all work fine when using show, but when I try to use draw() inside a method, I get the matplotlib window but not graph. The show() call will be done much later on the code and in a different method, and I would like to show one graph at the moment when it's done with draw(), not having to wait until the much later show(). What I'm doing wrong?
谢谢.
推荐答案
IIRC ,你应该可以多次调用 fig.show() .另外,请使用ipython( ipython -pylab
)和 http://matplotlib.sourceforge.net/users/shell.html
IIRC ,You should be able call fig.show() multiple times. Also, check out using ipython (ipython -pylab
) and http://matplotlib.sourceforge.net/users/shell.html
这篇关于matplotlib绘制什么都不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!