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 15:21:21 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

On Mon, Jun 07, 2010 at 12:44:43PM -0700, Eric Schulte wrote:
> The png is still included your output because the link to the png is
> part of your org-mode buffer.


That explains it. So here's the fix, add # at the beginning of the
line with the inline image.

======================================================================


* HEading

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


#+BEGIN_SRC R :results raw :exports none :var basename="MyFile"
# Data from org
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(paste("# [[file:",myPng,"]]",sep=""))

}

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]