>>>>> On Wed, 05 Nov 1997 15:33:25 +0000, >>>>> bensmail (b) wrote:b> Hello R users, b> This question might be already discussed before, I apologize b> if it is the case. b> Simple... how can I do to include a figure in a latex document. b> As I have already done in Splus, I tried this: b> \begin{figure} b> \special{psfile=gauss.ps .......} b> \end{figure} b> but it didn't work. Any help? I always use the epsfig packages, if it is not installed on your system you can get it from CTAN. I.e., \usepackage{epsfig} in the preamble and then \begin{figure} \epsfig{file=gauss.ps,width=.......} \end{figure} Hope this helps, Fritz -- ------------------------------------------------------------------- Friedrich Leisch Institut f?r Statistik Tel: (+43 1) 58801 4541 Technische Universit?t Wien Fax: (+43 1) 504 14 98 Wiedner Hauptstra?e 8-10/1071 Friedrich.Leisch at ci.tuwien.ac.at A-1040 Wien, Austria http://www.ci.tuwien.ac.at/~leisch PGP public key http://www.ci.tuwien.ac.at/~leisch/pgp.key ------------------------------------------------------------------- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
bensmail <bensmail at rulfsw.fsw.LeidenUniv.nl> writes:> This question might be already discussed before, I apologize > if it is the case. > Simple... how can I do to include a figure in a latex document. > As I have already done in Splus, I tried this: > > \begin{figure} > \special{psfile=gauss.ps .......} > \end{figure} > > but it didn't work. Any help?I've been using (Latex2e) documentclass[12pt,a4paper]{article} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \usepackage[danish]{babel} \usepackage{epsf} \newcommand{\Rfig}[1]{\epsfxsize8cm\epsffile{#1}} \begin{document} ... \begin{figure}[htbp] \begin{center} \leavevmode \Rfig{h-w.ps} \caption{Et standardplot} \label{fig:h-w} \end{center} \end{figure} with h-w.ps created by save.plot() Remember to start with x11(orientation='portrait'), or you get (some of?) the plots rotated. (I don't know what the \leavevmode is good for, AUCTeX inserts it when I do 'C-c C-e figure')> PS: I let down the Mac and the MS Window platforms and I am back > to my beloved Sun machine to run R, what a relief! ;-)Wait till you try it on Linux... -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Hello R users, This question might be already discussed before, I apologize if it is the case. Simple... how can I do to include a figure in a latex document. As I have already done in Splus, I tried this: \begin{figure} \special{psfile=gauss.ps .......} \end{figure} but it didn't work. Any help? Thank you in advance. PS: I let down the Mac and the MS Window platforms and I am back to my beloved Sun machine to run R, what a relief! ;-) Halima from Leiden. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
At 15:33 5/11/97 +0000, bensmail wrote:>Hello R users, > > >This question might be already discussed before, I apologize >if it is the case. >Simple... how can I do to include a figure in a latex document. >As I have already done in Splus, I tried this: > >\begin{figure} >\special{psfile=gauss.ps .......} >\end{figure} > >but it didn't work. Any help? >Thank you in advance. >Try viewing the eps file using Ghostview. Check that the ps file has bounding boxes. Also if there is too much white space around the graphic ask Ghostview to convert you R file into an eps file . It will trim much of the white space by redefining the bounding box. Then use the includegraphicx package in latex. It supersedes espf etc This new package seems to work like a charm. Good luck Ross =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=