emacs-orgmode
[Top][All Lists]
Advanced

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

[O] [Orgmode] Unable to capture the file name generated using matplotlib


From: Dror Atariah
Subject: [O] [Orgmode] Unable to capture the file name generated using matplotlib
Date: Sat, 2 May 2015 09:48:37 +0200

Consider the following example (from the documentation):

-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------
#+begin_src python :session :results file
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
fig=plt.figure(figsize=(3,2))
plt.plot([1,3,2])
fig.tight_layout()
plt.savefig('images/myfig.pdf')
'images/myfig.pdf' # return this to org-mode
#+end_src
-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------

It should return something like 

-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------
#+RESULTS:
[[file:images/myfig.pdf]]
-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------

But for me it returns merely 

-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------
#+RESULTS:
[[file:]]
-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------

That is, it doesn't capture the file name that should be the last evaluation.

How can I solve this problem?

reply via email to

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