emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-babel source code :fonts serif not working


From: Vikas Rawal
Subject: Re: [O] org-babel source code :fonts serif not working
Date: Fri, 27 Mar 2015 06:55:03 +0530

> 
> #+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 via email to

[Prev in Thread] Current Thread [Next in Thread]