emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Beginning R plot export


From: Nick Dokos
Subject: Re: [O] Beginning R plot export
Date: Tue, 10 May 2011 19:48:11 -0400

John Tait <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]