From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: Problem with babel and R + lattice Date: Fri, 09 Mar 2012 09:41:59 +0100 Message-ID: <4F59C257.2060401@gmail.com> References: Reply-To: R.M.Krug@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5vOv-0003DJ-2m for emacs-orgmode@gnu.org; Fri, 09 Mar 2012 03:42:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5vOo-0004Pw-HV for emacs-orgmode@gnu.org; Fri, 09 Mar 2012 03:42:12 -0500 Received: from mail-we0-f169.google.com ([74.125.82.169]:61561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5vOo-0004Pj-8Y for emacs-orgmode@gnu.org; Fri, 09 Mar 2012 03:42:06 -0500 Received: by werj55 with SMTP id j55so1198131wer.0 for ; Fri, 09 Mar 2012 00:42:02 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Hendy Cc: emacs-orgmode -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/03/12 21:52, John Hendy wrote: > Drat. I meant to add that when I run the code exactly as I have it from R directly, it works. I > literally copy and paste my org-mode babel block code line by line into a terminal and obtain > the proper output via tikz. *That's* the perplexing part. What would be working directly from R > and not from Org-mode? > > For reference, I've generated plenty of stuff just like this via org-mode/babel. Come to think > of it, even another lattice plot. > > Not sure how to pinpoint what's goofy about this specific plot. > > John > > On Thu, Mar 8, 2012 at 2:40 PM, John Hendy wrote: >> I have an R block like so: >> >> #+begin_src R >> >> library(lattice) library(tikzDevice) >> >> =bunch of code= >> >> barchart(side$name~side$x2,groups=side$type,horiz=T, >> xlim=c(0,0.75),col=c("lightblue","yellow"),xlab="Product Performance (2-box)") >> >> dev.off() tools::texi2dvi("bar-2b.tex",pdf=T) >> >> #+end_src >> >> The resultant tex file is empty where the tikz code should be and texi2dvi fails. Any >> suggestions? If I change my plot to base graphics with barplot, it works. I'm thinking this >> is a lattice/babel issue? As with ggplot, you have to print your plot (if I remember correctly), i.e: print(barchart(...)) Cheers, Rainer >> >> >> Thanks for any input, John > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9ZwlcACgkQoYgNqgF2egqMewCfar+JxC9uV9p1O2IYVVYcqyeM 7/4AnRLp8gYqSDe/74D9helafqNR5Vgt =aDVb -----END PGP SIGNATURE-----