emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [babel] babel creating corrupt pdf and png
@ 2010-08-26  6:15 Graham Smith
  2010-08-26 12:20 ` Eric Schulte
  0 siblings, 1 reply; 3+ messages in thread
From: Graham Smith @ 2010-08-26  6:15 UTC (permalink / raw)
  To: emacs-orgmode

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]]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [babel] babel creating corrupt pdf and png
  2010-08-26  6:15 [babel] babel creating corrupt pdf and png Graham Smith
@ 2010-08-26 12:20 ` Eric Schulte
  2010-08-26 14:21   ` Graham Smith
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Schulte @ 2010-08-26 12:20 UTC (permalink / raw)
  To: Graham Smith; +Cc: emacs-orgmode

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")
<<your-code-here>>
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 <myotisone@gmail.com> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [babel] babel creating corrupt pdf and png
  2010-08-26 12:20 ` Eric Schulte
@ 2010-08-26 14:21   ` Graham Smith
  0 siblings, 0 replies; 3+ messages in thread
From: Graham Smith @ 2010-08-26 14:21 UTC (permalink / raw)
  To: emacs-orgmode

Eriic,

Thanks,
> 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.

Will do, but sidetracked somewhere else now.

Its strange because some are now being produced fine, and other not.
They are all working fine if I copy the code into R.

Not the code I posted, I hasten to add, as it was jibberish, I now
realise, but that isn't the problem

Graahm

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-26 14:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-26  6:15 [babel] babel creating corrupt pdf and png Graham Smith
2010-08-26 12:20 ` Eric Schulte
2010-08-26 14:21   ` Graham Smith

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).