On Mon, Jun 07, 2010 at 01:40:32PM -0500, Erik Iverson wrote:
> You could just make your complex plots functions, and then call your  
> function in in one line. Or if you're using lattice or ggplot2, create  
> objects representing the plot, and then plot them in one line.

Funny you should mention that, I already did. ;]

So my current issue is that it appears that even though I set :export
none, the png is still included in my Latex output.

Suggestions?

======================================================================
* Heading

  blah blah blah blah blah blah blah blah blah blah blah blah blah

#+BEGIN_SRC R :results file :exports none :var basename="MyFile"

doublePlot = function (base, plotFunc) {

  # basename from org-babel
  myPng = paste(base,"png",sep=".")
  myPdf = paste(base,"pdf",sep=".")

  png(myPng,
      width  = 1024,
      height = 500)

  plotFunc()

  dev.off()

  pdf(myPdf,
      paper = 'usr')

  plotFunc()

  dev.off()

  print(myPng)

}

a = c(1,2,3,4)

doublePlot(base=basename, plotFunc=function(){
     plot(a)
     })

#+END_SRC

#+results:
[[file:MyFile.png]]

#+LATEX: \includegraphics[width=\textwidth]{MyFile.pdf}
======================================================================




------------------------------------------------------------------
Russell Adams                            rlad...@adamsinfoserv.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to