emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Orgmode] Unable to capture the file name generated using matplotlib
@ 2015-05-02  7:48 Dror Atariah
  2015-05-02 17:09 ` Nick Dokos
  2015-05-02 17:11 ` Nick Dokos
  0 siblings, 2 replies; 22+ messages in thread
From: Dror Atariah @ 2015-05-02  7:48 UTC (permalink / raw)
  To: schulte.eric, emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1093 bytes --]

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?

[-- Attachment #2: Type: text/html, Size: 1765 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2015-06-02 18:02 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-02  7:48 [Orgmode] Unable to capture the file name generated using matplotlib Dror Atariah
2015-05-02 17:09 ` Nick Dokos
2015-05-02 17:11 ` Nick Dokos
2015-05-05 20:20   ` Dror Atariah
2015-05-23 18:49     ` Dror Atariah
2015-05-25 17:25       ` Dror Atariah
2015-05-25 17:29         ` Ken Mankoff
2015-05-25 18:22           ` Dror Atariah
2015-05-25 18:30             ` John Kitchin
2015-05-26 13:11               ` Dror Atariah
2015-05-26 13:15                 ` Ken Mankoff
2015-05-26 13:19                   ` Dror Atariah
2015-05-26 13:26               ` Dror Atariah
2015-05-26 14:02                 ` Ken Mankoff
2015-05-26 14:37                   ` Dror Atariah
2015-05-26 18:39                   ` Dror Atariah
2015-06-02  5:49                     ` Dror Atariah
2015-06-02 12:21                       ` Ken Mankoff
2015-06-02 18:01                         ` Dror Atariah
2015-05-26  1:49             ` Ken Mankoff
2015-05-26 13:18               ` Dror Atariah
2015-05-26 14:05                 ` Ken Mankoff

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).