From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Nobis Subject: Babel and R: Call code block and output plot Date: Mon, 27 Jul 2015 18:17:12 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJl5h-00037L-NT for emacs-orgmode@gnu.org; Mon, 27 Jul 2015 12:17:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJl5d-0001cc-I2 for emacs-orgmode@gnu.org; Mon, 27 Jul 2015 12:17:25 -0400 Received: from basilikum.nobis-admin.de ([89.238.71.130]:58034) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJl5d-0001bh-9S for emacs-orgmode@gnu.org; Mon, 27 Jul 2015 12:17:21 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by basilikum.nobis-admin.de (Postfix) with ESMTP id 1DD077E41B7 for ; Mon, 27 Jul 2015 18:17:18 +0200 (CEST) Received: from basilikum.nobis-admin.de ([127.0.0.1]) by localhost (basilikum.nobis-admin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ag_yJvbsS2YE for ; Mon, 27 Jul 2015 18:17:12 +0200 (CEST) Received: from karotte.fritz.box (unknown [IPv6:2001:4dd0:fb8a:0:8133:2467:c01a:8f6e]) by basilikum.nobis-admin.de (Postfix) with ESMTPSA for ; Mon, 27 Jul 2015 18:17:12 +0200 (CEST) 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. I'm playing a little bit with R code blocks in babel and calling them in different parts of my document (e.g. showing output in the main part and the code in the appendix). With most code blocks (e.g. setting some variables or outputting a LaTeX table with xtable) this works as expected (thanks to all working on this; its really great). Now I wanted to show a plot, but the associated code should also be shown in the appendix. In this case CALL seems not to work (not plot file is created or its empty). Here is a small example of what I'm trying to achieve: --8<---------------cut here---------------start------------->8--- #+TITLE: Plotting Test #+OPTIONS: author:nil date:nil email:nil toc:nil #+CREATOR: Emacs 24.5.1 (Org mode 8.2.10) #+STARTUP: showall #+PROPERTY: session *R* #+PROPERTY: exports results * Main Part Here I want to show some plot: #+CALL: myplot[:exports results]() * Appendix Here the code of the plot should be shown: #+NAME: myplot #+BEGIN_SRC R :results output graphics :exports code :file my-plot.pdf hist(rnorm(50)) #+END_SRC --8<---------------cut here---------------end--------------->8--- Any ideas what I'm doing wrong or how to better achieve my goal? -- Until the next mail..., Stefan.