Skip to content
Prev 105939 / 398503 Next

R and LaTeX

David Kaplan <dkaplan at education.wisc.edu> wrote:

            
David--

The basic paradigm is to save the graph from R in encapsulated
Postscript format.  The procedure can vary slightly by the OS
you are using R under.  Under Windows, I usually generate the
graphics in the windows() device, then use savePlot to save it
to eps.

In Latex, you can put 

\usepackage{graphicx}

in the document preamble and something like

\begin{figure}[!th]
\includegraphics[height=8in]{figurename.eps}\\
\end{figure}

into the text to put the figure in a float.  To put in exactly
where the statement occurs, omit putting it into a figure
environment.

HTH,

--Mike