emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Re: org-babel-R export parameters


From: Russell Adams
Subject: Re: [Orgmode] Re: org-babel-R export parameters
Date: Mon, 7 Jun 2010 13:51:19 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

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

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

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



reply via email to

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