From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Beginning R plot export Date: Tue, 10 May 2011 19:48:11 -0400 Message-ID: <7282.1305071291@alphaville.americas.hpqcorp.net> References: Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:39078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJwf1-0007eA-O8 for emacs-orgmode@gnu.org; Tue, 10 May 2011 19:48:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QJwf0-0003Ql-Lx for emacs-orgmode@gnu.org; Tue, 10 May 2011 19:48:15 -0400 Received: from g4t0014.houston.hp.com ([15.201.24.17]:45896) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJwf0-0003PT-Ih for emacs-orgmode@gnu.org; Tue, 10 May 2011 19:48:14 -0400 In-Reply-To: Message from John Tait of "Wed, 11 May 2011 00:28:03 BST." 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: John Tait Cc: nicholas.dokos@hp.com, emacs-orgmode John Tait wrote: > Hi > > Do I need to do extra configuration to get R plot output in LaTeX exports? > > Using the simplest code block: > > #+SRCNAME: graph > #+BEGIN_SRC R :exports both > x=c(1,2) > y=c(2,4) > plot(x,y) > x > #+END_SRC > > The numbers "1 2" appear in the LaTeX output, indicating that R is > running. The plot doesn't appear though. What am I missing? > The following works for me: --8<---------------cut here---------------start------------->8--- #+SRCNAME: graph #+BEGIN_SRC R :exports both :results graphics :file foo.png x=c(1,2) y=c(2,4) plot(x,y) #+END_SRC --8<---------------cut here---------------end--------------->8--- Nick