help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

matplotlib figures in python in emacs on windows


From: Strozzi, David J.
Subject: matplotlib figures in python in emacs on windows
Date: Sun, 29 Oct 2017 16:58:14 +0000

Hi,

I am running Windows 7, with python tools from Anaconda (python 3.6.2, 
matplotlib 2.0.2), and the windows native emacs build.  Matplotlib figure 
windows aren't working.

This won't make sense if you don't use matplotlib:

* From a plain DOS prompt:
python
from pylab import *
figure(1); plot(1,1); show()
# works - figure window appears, I can use the buttons, no python prompt until 
I close figure window
ion()
figure(1); plot(1,1); show()
# works - figure window appears and I get python prompt back

* emacs -Q (customizations off)
M-x run-python
same things as above don't work:
from pylab import *
figure(1)
plot(1,1)
# no figure window, no python prompt
kill process
M-x run-python
from pylab import *
ion()
figure(1)
# window appears, buttons work, python prompt works
plot(1,1)
# doesn't work - figure window doesn't update, no python prompt


I got on this because I am trying to run ipython within emacs using the elpy 
package.  Similar problems occur.  So after talking to various people we tried 
this simpler case - no ipython, no elpy.  Frankly I'm impressed matplotlib 
works interactively at all outside of ipython.

Tom Caswell (matplotlib) thinks the issue is how PyOS_InputHook is being 
handled.  But this beyond me and I'd rather not become an expert in this.

Thoughts?

Dave



reply via email to

[Prev in Thread] Current Thread [Next in Thread]