python-drawnow icon indicating copy to clipboard operation
python-drawnow copied to clipboard

'module' object has no attribute 'draw_all'

Open jue-jiang opened this issue 8 years ago • 5 comments

Hi, I want to use drawnow , but came across the following error, is it because of my matplotlib version? I install matplotlib on ubuntu 14.04 with sudo apt-get install python-matplotlib.

File "/usr/local/lib/python2.7/dist-packages/drawnow/drawnow.py", line 61, in drawnow else: plt.draw_all() AttributeError: 'module' object has no attribute 'draw_all'

jue-jiang avatar Oct 30 '17 07:10 jue-jiang

What matplotlib version do you have? You can find out with

>>> import matplotlib
>>> matplotlib.__version__
2.0.2

I don't think it's due to versioning; draw_all is still defined in matplotlib/pyplot.py#L206 in the latest commit

stsievert avatar Oct 30 '17 14:10 stsievert

Hi Steve,

I'm on version 2.0.2

On 30 Oct 2017 4:35 p.m., "Scott Sievert" [email protected] wrote:

What matplotlib version do you have? You can find out with

import matplotlib>>> matplotlib.__version__2.0.2

I don't think it's due to versioning; draw_all is still defined in matplotlib/pyplot.py#L206 https://github.com/matplotlib/matplotlib/blob/58ec50606ffe62de827897b3ebd72a235d242ab1/lib/matplotlib/pyplot.py#L206 in the latest commit

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/stsievert/python-drawnow/issues/5#issuecomment-340463054, or mute the thread https://github.com/notifications/unsubscribe-auth/AHMSjridQ4pkDphM4CtRnphLhq2KU3Mlks5sxd7HgaJpZM4QKwRo .

SirBax avatar Oct 30 '17 16:10 SirBax

What updates are there on this?

stsievert avatar Jan 31 '18 03:01 stsievert

I had the exact error when plotting oscilloscope which is solved by editing the file drawnow.py. You’ll find that file in usr/local/lib/python2.7/distpackages/drawnow

I edited plt.draw_all() with plt.show() in else. Jump to line 66. I hope it works

Gandhalee avatar Sep 04 '18 17:09 Gandhalee

@Gandhalee do you have a traceback I can see? How did you install python-drawnow? What version of matplotlib do you have?

stsievert avatar Sep 07 '18 22:09 stsievert