emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [Orgmode] Unable to capture the file name generated using matplo


From: Dror Atariah
Subject: Re: [O] [Orgmode] Unable to capture the file name generated using matplotlib
Date: Tue, 5 May 2015 22:20:40 +0200

Obviously, I have the directory in place, and the file is actually saved properly in it. The version is use is:
Org-mode version 8.2.10 (8.2.10-40-gc763fa-elpaplus @ /Users/drorata/.emacs.d/elpa/org-plus-contrib-20150504/)

Finally, here is the output that I have in the python interactive session:

-----------8<-----------8<-----------8<-----------8<-----------8<-----------8<-----------8<-----------8<-----------8<-----------8<-----------8<-----------8<-----------
>>> import matplotlib
import matplotlib
>>> matplotlib.use('Agg')
matplotlib.use('Agg')
import matplotlib.pyplot as plt
>>> import matplotlib.pyplot as plt
fig=plt.figure(figsize=(3,2))
>>> fig=plt.figure(figsize=(3,2))
plt.plot([1,3,2])
>>> plt.plot([1,3,2])
fig.tight_layout()
fig.tight_layout()
plt.savefig('images/myfig.png')
plt.savefig('images/myfig.png')
'images/myfig.png' # return this to org-mode
'images/myfig.png' # return this to org-mode


open('/var/folders/kz/1c2cxn1x60n_t5p2j1p02b180000gn/T/babel-22151hFS/python-22151B4O', 'w').write(str(_))
open('/var/folders/kz/1c2cxn1x60n_t5p2j1p02b180000gn/T/babel-22151hFS/python-22151B4O', 'w').write(str(_))




'org_babel_python_eoe'
'org_babel_python_eoe'
[<matplotlib.lines.Line2D object at 0x10ebb6eb8>]
>>> 'images/myfig.png'
>>> >>> 16
>>> >>> >>> 'org_babel_python_eoe'
>>> 
-----------8<-----------8<-----------8<-----------8<-----------8<-----------8<-----------8<-----------8<-----------8<-----------8<-----------8<-----------8<-----------

From this it seems like the right thing happens, but still org doesn't manage to capture it. I'm still in the dark. At work I manage to get the images inserted properly and it is simply fabulous! I want it also on my mac!!! :)

Thanks in advance,
Dror



On Sat, May 2, 2015 at 7:11 PM, Nick Dokos <address@hidden> wrote:
Dror Atariah <address@hidden> writes:

> How can I solve this problem?

I should have added: ... after I create the "images" directory.
I don't think the savefig() can do that.





reply via email to

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