emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Vikas Rawal <vikaslists@agrarianresearch.org>
To: "Charles C. Berry" <ccberry@ucsd.edu>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: org-babel source code :fonts serif not working
Date: Fri, 27 Mar 2015 06:55:03 +0530	[thread overview]
Message-ID: <E24B72AA-E739-4B89-9DD1-70A65546FBD3@agrarianresearch.org> (raw)
In-Reply-To: <alpine.OSX.2.00.1503261106320.1241@charles-berrys-macbook.local>

> 
> #+BEGIN_SRC R
>  png(filename="filename.png",width=1200,height=700,fonts="serif")
>  tryCatch({
>  <<<< your plot goes here >>>>
>  },
>           error=function(e){
>               plot(x=-1:1, y=-1:1, type='n', xlab='', ylab='', axes=FALSE)
>               text(x=0, y=0, labels=e$message, col='red')
>               paste('ERROR', e$message, sep=' : ')})
>  dev.off()
> #+END_SRC
> 
> 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. 

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
<<R code here to produce a graph>>
#+END_SRC

Vikas

      reply	other threads:[~2015-03-27  1:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26  2:14 org-babel source code :fonts serif not working Vikas Rawal
2015-03-26 18:15 ` Charles C. Berry
2015-03-27  1:25   ` Vikas Rawal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E24B72AA-E739-4B89-9DD1-70A65546FBD3@agrarianresearch.org \
    --to=vikaslists@agrarianresearch.org \
    --cc=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).