John Tait <johngt...@gmail.com> 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