From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petro Subject: Re: export inline image from source results? Date: Tue, 21 Aug 2012 22:41:51 +0200 Message-ID: <87fw7grn8w.fsf@cica.cica> References: <87k3wsruvd.fsf@cica.cica> <87boi4vypp.fsf@gmx.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3vH1-0006oS-Vd for emacs-orgmode@gnu.org; Tue, 21 Aug 2012 16:42:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T3vH0-00043G-Sy for emacs-orgmode@gnu.org; Tue, 21 Aug 2012 16:42:03 -0400 Received: from plane.gmane.org ([80.91.229.3]:36915) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3vH0-00043C-Lm for emacs-orgmode@gnu.org; Tue, 21 Aug 2012 16:42:02 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T3vGz-0007DV-T0 for emacs-orgmode@gnu.org; Tue, 21 Aug 2012 22:42:01 +0200 Received: from 0x4dd745cf.adsl.cybercity.dk ([77.215.69.207]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Aug 2012 22:42:01 +0200 Received: from x.piter by 0x4dd745cf.adsl.cybercity.dk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Aug 2012 22:42:01 +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 Eric Schulte writes: > Petro writes: > >> Hi all. >> I generate an image from python source like this: >> _____________________________________________________ >> #+BEGIN_SRC python :results output raw :export results >> from pylab import figure, plot >> import pylab as plt >> import numpy as np >> plt.ioff() >> figure() >> plot(np.random.rand(10),'o') >> pic_name='fit_rates1.svg' >> path_name='/home/petro/tmp/' >> plt.savefig(path_name + pic_name) >> print "[" + "[" + path_name + pic_name +"]]" >> >> #+END_SRC >> >> #+RESULTS: >> [[/home/petro/tmp/fit_rates1.svg]] >> >> _____________________________________________________ >> Can I export the result? Rigth now the image is exported only if I copy the image link and >> paste it few lines below. > > Hi Petro, > > Is the link exported at all, or do you get no results export? > > You could add the following additional header argument to your code > block to inform org-mode that the results are a link to a file. > > :file /home/petro/tmp/fit_rates1.svg > > Best, > >> >> Thanks. >> Petro >> I think I cannot use :file header argument, if I remember well with this argument org-mode will create a new results file overwriting the one created by a command in the source code. My problem solved. I've made a mistake of using :export instead of :exports in the source header. Now everything works. Thanks Petro