From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Edgington Subject: Re: org-babel generated images and +ATTR_LATEX Date: Thu, 24 Oct 2013 02:30:08 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZAlV-0006VH-PK for emacs-orgmode@gnu.org; Wed, 23 Oct 2013 22:35:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZAlO-0001Pw-Ad for emacs-orgmode@gnu.org; Wed, 23 Oct 2013 22:35:13 -0400 Received: from plane.gmane.org ([80.91.229.3]:60541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZAlO-0001Lj-3j for emacs-orgmode@gnu.org; Wed, 23 Oct 2013 22:35:06 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VZAlL-00012u-WE for emacs-orgmode@gnu.org; Thu, 24 Oct 2013 04:35:04 +0200 Received: from c-24-11-115-178.hsd1.mi.comcast.net ([24.11.115.178]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 24 Oct 2013 04:35:03 +0200 Received: from edgimar by c-24-11-115-178.hsd1.mi.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 24 Oct 2013 04:35:03 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Mike, That does help -- when testing it, I found that the problem had more to do with my header options than to do with the presence or absence of a #+NAME line. But still, with the header options I gave in my original example, org-babel's behavior does seem strange (maybe buggy?) to me. My working code now looks like: #+begin_src python :exports results :results file :eval no-export import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt fig=plt.figure(figsize=(3,2)) plt.plot([1,3,2]) fig.tight_layout() figname = '/tmp/myfig.jpg' plt.savefig(figname) return(figname) # return this to org-mode #+end_src #+ATTR_LATEX: :float figure :placement [htb!] :width 0.38\textwidth #+RESULTS: Anyhow, something that wasn't clear to me about your example is how you make the filename which is generated via org-babel-temp-file available for use within the code-block? Regards, Mark