I don't know how to export multiple graphs per one #+RESULTS
.
But I might export multiple graphs, or handle multiple inline images within org-mode, by a dirty way.
Just save graph files by png()
, pdf()
, etc.
#+BEGIN_SRC R :session *R* :results output :exports none
d<-1:5
dd<-data.frame(cbind(x=d, y=d^2, z=d^3))
for(i in 1:3){
png(paste0("tmp",i,".png"))
plot(dd[,i],type="b",pch=16,col=i,cex=i,main=paste0("tmp",i))
dev.off()}
#+END_SRC
Then, just make links for each graphic files by hands ;)
If you change the data, such as d<-1:10
, and execute the source code block by C-c C-c
, you can see multiple inline images reflect the results simultaneously.
Making links with numbering are stupid simple tasks, I'm sure Emacs Lisp handle numbering tasks without difficulty!
#+CAPTION: tmp1
#+NAME: tmp1
#+ATTR_LaTeX: :height 4cm
#+ATTR_HTML: :width 360
[[file:tmp1.png]]
#+CAPTION: tmp2
#+NAME: tmp2
#+ATTR_LaTeX: :height 4cm
#+ATTR_HTML: :width 360
[[file:tmp2.png]]
#+CAPTION: tmp3
#+NAME: tmp3
#+ATTR_LaTeX: :height 4cm
#+ATTR_HTML: :width 360
[[file:tmp3.png]]