From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vikas Rawal Subject: Re: org-babel source code :fonts serif not working Date: Fri, 27 Mar 2015 06:55:03 +0530 Message-ID: References: <182B46AC-4D37-45AA-A576-8F3569B5080F@agrarianresearch.org> Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbJ1O-0008Vo-Mg for emacs-orgmode@gnu.org; Thu, 26 Mar 2015 21:25:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbJ1J-0006hN-KQ for emacs-orgmode@gnu.org; Thu, 26 Mar 2015 21:25:14 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:34223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbJ1J-0006hD-Ed for emacs-orgmode@gnu.org; Thu, 26 Mar 2015 21:25:09 -0400 Received: by pdbni2 with SMTP id ni2so80038584pdb.1 for ; Thu, 26 Mar 2015 18:25:08 -0700 (PDT) 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: "Charles C. Berry" Cc: org-mode mailing list >=20 > #+BEGIN_SRC R > png(filename=3D"filename.png",width=3D1200,height=3D700,fonts=3D"serif"= ) > tryCatch({ > <<<< your plot goes here >>>> > }, > error=3Dfunction(e){ > plot(x=3D-1:1, y=3D-1:1, type=3D'n', xlab=3D'', ylab=3D'',= axes=3DFALSE) > text(x=3D0, y=3D0, labels=3De$message, col=3D'red') > paste('ERROR', e$message, sep=3D' : ')}) > dev.off() > #+END_SRC >=20 > If you can get that or something like to work in R, report back here. Thanks for the pointer. It is an issue with the graphics device being = used.=20 Using cairo and family (instead of fonts) works for me: #+BEGIN_SRC R :results output graphics :exports results :file = filename.png :width 1200 :height 700 :type cairo :family serif <> #+END_SRC Vikas=