Dear all,
let say I have these lines:
#+PROPERTY: session *py*
#+PROPERTY: results output
#+BEGIN_SRC python
import matplotlib.pyplot as plt
a=[1,2,3]
#+END_SRC
I execute the code block, no problem
Then I execute this:
#+BEGIN_SRC python
plt.plot(a)
#+END_SRC
boom, emacs hangs
result doesn't change if I write plt.plot(a) directly in the *Python* buffer activated by org-babel-pop-to-session.
if I use pylab (interactive mode of matplotlib), I can see a window with the plot, but then the *Python* shell is unresponsive, and the only thing I can do is just killing it.
Please note that
#+BEGIN_SRC python :session none
import matplotlib.pyplot as plt
a=[1,2,3]
plt.plot(a)
plt.savefig('dummy.png')
#+END_SRC
works perfectly.
It would be wonderful for me to be able to use sessions & matplotlib...
So, thanks a lot for any suggestions!
Giacomo M
Python 2.7.2 win32
matplotlib 1.1.0
Emacs 24.1.1 (i386-mingw-nt5.1.2600)
org-mode 7.8.11