Re: [R] How to paste graph from R in Latex?

From: Vincent Goulet <vincent.goulet_at_act.ulaval.ca>
Date: Fri, 16 May 2008 21:51:24 -0400

Le ven. 16 mai à 21:24, Roslina Zakaria a écrit :

> Dear R-expert,
> Is it possible to save graph from R into Latex document? I can see
> save as metafile , PNG, pdf etc, but I'm not sure which one to use.
> Thank you so much for your help.

If you use latex, you should go for Encapsulated PostScript (EPS) using the postscript() device. With pdflatex, you may opt for PDF.

Want a good hint? Have a look at Sweave[1] and let it take care of the graph for you. That way, the code to create the graph will be saved with your LaTeX document.

HTH Vincent

[1] See http://www.statistik.lmu.de/~leisch/Sweave/

---
   Vincent Goulet, Associate Professor
   École d'actuariat
   Université Laval, Québec
   Vincent.Goulet@act.ulaval.ca   http://vgoulet.act.ulaval.ca

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Sat 17 May 2008 - 01:57:31 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 17 May 2008 - 04:30:38 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive