#+TITLE:test #+BABEL: :session *R* :results output graphics :exports both #+source: plot1 #+begin_src R :file a1.png :width 500 :height 500 a <- b <- 1:10 plot(a, b) #+end_src #+ATTR_LaTeX: width=500px #+results: plot1 [[file:a1.png]] #+source: plot2 #+begin_src R :file a2.png :width 1000 :height 1000 plot(a, b) #+end_src #+ATTR_LaTeX: width=100px #+results: plot2 [[file:a2.png]] #+source: plot3 #+begin_src R :file a3.pdf :width 5 :height 5 a <- b <- 1:10 plot(a, b) #+end_src #+ATTR_LaTeX: width=5px #+results: plot3 [[file:a3.pdf]] #+source: plot4 #+begin_src R :file a4.pdf :width 10 :height 10 plot(a, b) #+end_src #+ATTR_LaTeX: width=10 #+results: plot4 [[file:a4.pdf]]