From: Petro <x.piter@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: export inline image from source results?
Date: Tue, 21 Aug 2012 22:41:51 +0200 [thread overview]
Message-ID: <87fw7grn8w.fsf@cica.cica> (raw)
In-Reply-To: 87boi4vypp.fsf@gmx.com
Eric Schulte <eric.schulte@gmx.com> writes:
> Petro <x.piter@gmail.com> 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
prev parent reply other threads:[~2012-08-21 20:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-21 17:57 export inline image from source results? Petro
2012-08-21 19:20 ` Eric Schulte
2012-08-21 20:41 ` Petro [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fw7grn8w.fsf@cica.cica \
--to=x.piter@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.