[R] R graphs in LaTeX documents?

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Feb 7 09:21:13 CET 2002


On Thu, 7 Feb 2002, Robert Lundqvist wrote:

> I have tried to find a neat way to include graphs from R in LaTeX documents,
> but have not succeeded (I work with a WinEdt/MikTeX combination). The two
> roads I have stumbled along so far are the following:
>
> *Generate postscript files and convert them into EPS files by means of
> GhostScript or other not so straightforward tools.

Generate .eps directly by using dev.copy2eps or from the menu on the
graphics window or by following the instructions in ?postscript.
No conversion should be needed.

> *Generate pictex files and include these.

That driver does work but is minimally-featured.  Not recommended.

> None of these solutions have worked so far. I haven't spent so much time
> trying to find out what goes wrong, but since there might both LaTeX gurus
> and R wizards among you, I simply thought it would be better to lean on that
> expertize first. Any suggestions about how to achieve what really should be
> a simple task?

It really is a simple task.  Use dev.copy2eps and then the graphicx
package in latex.  You give us no clue as to your problems, so it is
difficult to give any advice.

-- 
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list