From mboxrd@z Thu Jan 1 00:00:00 1970 From: Graham Smith Subject: Re: Org babel R Help Date: Sun, 21 Mar 2010 09:53:41 +0000 Message-ID: <2c75873c1003210253q491d221bib59d195a8c9e4e41@mail.gmail.com> References: <20100319210128.15640tev1fryn3h4@www.studentmail.otago.ac.nz> <87mxy4wfi1.fsf@stats.ox.ac.uk> <5084fc611003210151x41850afcg36b275679ae76acb@mail.gmail.com> <20100321221848.100245krd2ozqirc@www.studentmail.otago.ac.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NtHqs-000464-Ll for emacs-orgmode@gnu.org; Sun, 21 Mar 2010 05:53:46 -0400 Received: from [140.186.70.92] (port=58053 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NtHqr-00045E-05 for Emacs-orgmode@gnu.org; Sun, 21 Mar 2010 05:53:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NtHqp-0000Rp-J7 for Emacs-orgmode@gnu.org; Sun, 21 Mar 2010 05:53:44 -0400 Received: from mail-ww0-f41.google.com ([74.125.82.41]:57962) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NtHqp-0000Re-Ep for Emacs-orgmode@gnu.org; Sun, 21 Mar 2010 05:53:43 -0400 Received: by wwb39 with SMTP id 39so152422wwb.0 for ; Sun, 21 Mar 2010 02:53:41 -0700 (PDT) In-Reply-To: <20100321221848.100245krd2ozqirc@www.studentmail.otago.ac.nz> 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: Emacs-orgmode@gnu.org Joseph/Dan >>> 2) Width/Height exports for R graphics output. Do they work? >>> >>> I've tried a lot of combinations of :width and :height as exports, and >>> they don't seem to work at all. I've tried small numbers (1-10), large >>> numbers (100-2000) and numbers prefixed by "cm" with no luck. >> >> Hmm, I'm not seeing a problem here. It works for me with both png and >> pdf output. E.g. >> >> #+begin_src R :file z.pdf :width 20 :height 40 :exports both >> plot(1:10) >> #+end_src > >> What image format (i.e. R graphics device) are you using? =C2=A0Can you = post >> an example block that is not working? The values for :width and :height >> will be passed straight on to the graphics device, so their meaning >> depends on which graphics device is being used in R. > > I'm trying the code you posted with the latest org-mode from ubuntu and > getting nothing in my results if I use png. If I use pdf, I get a really > tiny chart which is incomprehensible. Width and height seem to work > randomly, as using 20:40 work with pdf (although tiny), but 100,100 do no= t > work at all. > > It only works correctly if I use the #+attr_latex: width=3DXcm and omit t= he > width and height. Based on what is happening here with me on Ubuntu 9.10, R 2.10 and orgmode = 6.34. The ":file z.pdf :width 20 :height 40 :exports both" is affecting the size of the graphic that R produces. If you open x.pdf directly you will find that it changes size as expected. BUT regardless of the size of the z.pdf, Latex defaults to a fixed, and tiny, standard size. Unless you give an explicit latex command #+attr_latex: width=3DXcm > Using babel. For some reason my R graphics embedded within my pdf's don't > seem to be as "nice" as viewing them from within R, i.e. slightly fuzzy > edges. It's like the antialiasing has failed or something. The text label= s > on the axes are definitely not up to latex standard. Are you just viewing them or printing them. I find with Ubuntu that the default viewer seems to arbitrarily change between programs and the quality of graphics on the screen varies, but the quality of printed output stays the same. Try opening the final PDF in an alternative viewer and see if things still appear the same. Graham