R-beta: Latex and R

Peter Dalgaard BSA p.dalgaard at kubism.ku.dk
Wed Nov 5 15:58:06 CET 1997


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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



More information about the R-help mailing list