emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Dror Atariah <drorata@gmail.com>
To: Nick Dokos <ndokos@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: [Orgmode] Unable to capture the file name generated using matplotlib
Date: Tue, 5 May 2015 22:20:40 +0200	[thread overview]
Message-ID: <CANfRcg0CguKRXkE+4LC=stRo9ET+KRCny=L==wA+QjiMNoMBGw@mail.gmail.com> (raw)
In-Reply-To: <87wq0qsy4o.fsf@alphaville.usersys.redhat.com>

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

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 <ndokos@gmail.com> wrote:

> Dror Atariah <drorata@gmail.com> 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.
>
>
>

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

  reply	other threads:[~2015-05-05 20:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANfRcg0CguKRXkE+4LC=stRo9ET+KRCny=L==wA+QjiMNoMBGw@mail.gmail.com' \
    --to=drorata@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ndokos@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).