From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [babel] babel creating corrupt pdf and png Date: Thu, 26 Aug 2010 06:20:50 -0600 Message-ID: <87aao91s65.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=48715 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OobS2-0003gO-JX for emacs-orgmode@gnu.org; Thu, 26 Aug 2010 08:21:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OobRv-0008TO-Mn for emacs-orgmode@gnu.org; Thu, 26 Aug 2010 08:20:57 -0400 Received: from mail-px0-f169.google.com ([209.85.212.169]:60237) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OobRv-0008TB-HE for emacs-orgmode@gnu.org; Thu, 26 Aug 2010 08:20:55 -0400 Received: by pxi5 with SMTP id 5so1070573pxi.0 for ; Thu, 26 Aug 2010 05:20:54 -0700 (PDT) In-Reply-To: (Graham Smith's message of "Thu, 26 Aug 2010 07:15:12 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Graham Smith Cc: emacs-orgmode@gnu.org Hi Graham, These pdf and png images are being created by R, Babel is simply passing commands to the R process setting the output device according to the :file argument, so for example ":file fig1.pdf" would result in wrapping your code in pdf(file="fig1.pdf") <> dev.off I'd suggest looking at the R session ("bats" in your case) to see what errors if any are being thrown by R during execution of the boxplot command. Best -- Eric Graham Smith writes: > PDFs created by Babel are giving a file corrupt message when trying to > open them and a format not recognised message if I try pngs, > > Same files created directly from R are fine. > > This is with Ubuntu 10.04 and Org-mode version 6.36trans (release_7.01h.94.g25ac > > Example of code I am using is below. > > Can anyone suggest what I am doing wrong? > > Many thanks, > > Graham > > #+srcname:boxpip45byyear > #+begin_src R :session bats :file boxpip45byyear.pdf :exports code > boxplot(boxplot(allbats$count[allbats$species=="p45"]~allbats$year[allbats$species=="p45"]) > #+end_src > > #+results: boxpip45byyear > [[file:boxpip45byyear.pdf]] > > _______________________________________________ > 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