[R] R graphs in LaTeX documents?

Michael_Nielsen/Syd/Synergy.SYNERGY@synergy.com.au Michael_Nielsen/Syd/Synergy.SYNERGY at synergy.com.au
Fri Feb 8 00:52:43 CET 2002


I have no doubt it will be useful to many.

On behalf of all of us for whom the pdf() driver (and, indeed R itself) has
lightened the burden, thank you for your efforts!

Regards,

Mike


                                                                                                                                 
                    Prof Brian Ripley                                                                                            
                    <ripley at stats.ox.ac.        To:                                                                              
                    uk>                         Michael_Nielsen/Syd/Synergy.SYNERGY<Michael_Nielsen/Syd/Synergy.SYNERGY at synergy. 
                    Sent by:                    com.au>                                                                          
                    owner-r-help at stat.ma        cc:     "'r-help at lists.R-project.org'" <r-help at stat.math.ethz.ch>                
                    th.ethz.ch                  Subject:     Re: [R] R graphs in LaTeX documents?                                
                                                                                                                                 
                                                                                                                                 
                    08/02/2002 09:20 AM                                                                                          
                                                                                                                                 
                                                                                                                                 




On Fri, 8 Feb 2002 Michael_Nielsen/Syd/Synergy.SYNERGY at synergy.com.au
wrote:

> I'll admit to being somewhat of a graphics meathead, but recently needed
to
> put lots of R graphics into a report that I was typesetting with LaTeX
> (well, pdflatex on Linux).  I couldn't coerce pdflatex to use the eps
> graphics (it seems to be there has to be a way, but I was in too much of
a

The only good way is to convert .eps to pdf (or, much worse, to png).
The best way to do that is Adobe Distiller, the second-best way epsftopdf,
a Perl script / Windows program calling ghostscript, preferably 6.0 or
later.  It is practically identical to what bitmap() does in R.

> hurry to try to find it), so I asked R to generate the graphics directly
> into PDF, and then included them into my LaTeX with an \includegraphics.
> To me, the result looked pretty good -- much better, in fact, than it did
> with either jpg or png output, although the poor result with jpg and png
> could well be because of my naive choices for the various settings of
> things required along the way.

That's typical for the sort of graphs one produces in R.

> Anyway, I am continually impressed with R's ability to produce good
results
> in spite of my somewhat inelegant (ok, ham-fisted) approach.

I wrote the pdf() driver because it seemed a cleaner solution, and it was
an intellectual challenge.  From this thread it seems it has much more use
than I realized, which is nice to know.

--
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._._




-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list