emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <eric.schulte@gmx.com>
To: Petro <x.piter@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: export inline image from source results?
Date: Tue, 21 Aug 2012 13:20:34 -0600	[thread overview]
Message-ID: <87boi4vypp.fsf@gmx.com> (raw)
In-Reply-To: <87k3wsruvd.fsf@cica.cica> (Petro's message of "Tue, 21 Aug 2012 19:57:10 +0200")

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
>
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

  reply	other threads:[~2012-08-21 19:22 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 [this message]
2012-08-21 20:41   ` Petro

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=87boi4vypp.fsf@gmx.com \
    --to=eric.schulte@gmx.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=x.piter@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).