emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: <Ken.Williams@thomsonreuters.com>
To: emacs-orgmode@gnu.org
Subject: [babel] Emitting both text & graphics output
Date: Tue, 22 Mar 2011 15:02:42 -0500	[thread overview]
Message-ID: <C9AE6A92.28554%ken.williams@thomsonreuters.com> (raw)


Suppose I have a source block like the following, which both 'print's some
text output and 'plot's to a graphics device:

#+begin_src R :file tp.png :exports both :results output graphics
dat <-  matrix(runif(12), 6, 2)

I can't seem to get the print() output to display, either by exporting to
HTML or by simple evaluation of the code block.

'C-c C-c' results in the following 'results' section:


And 'C-c C-e b' results in HTML output like this:

<pre class="src src-R">dat <span style="color: #008b8b;">&lt;-</span>
matrix(runif(12), 6, 2)
<img src="tp.png"  alt="tp.png" />


Neither of those have the actual printed matrix output, which would be
something like this:

#+begin_src R :exports both :results output
dat <-  matrix(runif(12), 6, 2)

:           [,1]      [,2]
: [1,] 0.3675202 0.1995134
: [2,] 0.9221087 0.1225686
: [3,] 0.6534830 0.6986238
: [4,] 0.3523151 0.1299406
: [5,] 0.7207582 0.5494278
: [6,] 0.3665547 0.6328452

Any clues?  Thanks.

Ken Williams
Senior Research Scientist
Thomson Reuters

             reply	other threads:[~2011-03-22 20:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-22 20:02 Ken.Williams [this message]
2011-03-22 21:06 ` [babel] Emitting both text & graphics output Mikhail Titov
2011-03-22 23:28 ` suvayu ali
2011-03-23  1:20   ` Nick Dokos

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:

  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=C9AE6A92.28554%ken.williams@thomsonreuters.com \
    --to=ken.williams@thomsonreuters.com \
    --cc=emacs-orgmode@gnu.org \


* 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


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