[R] Figures in Latex

Felipe Carrillo mazatlanmexico at yahoo.com
Fri Jul 23 22:54:33 CEST 2010


Hannah: I am not sure if this is what you
need but you can use an array to do that.
Copy and paste the below code to your latex code.

\newpage
\begin{landscape}
\begin{figure}[h]
\begin{center}$
\begin{array}{cc}
\includegraphics[width=2in]{yourgraphicname} &
\includegraphics[width=2in]{yourgraphicname} \\
\includegraphics[width=2in]{yourgraphicname} &
\includegraphics[width=2in]{yourgraphicname\\
\includegraphics[width=2in]{yourgraphicname} &
\includegraphics[width=2in]{yourgraphicname}\\
\end{array}$
\end{center}
\caption{is this what you had in mind?}
\end{figure}
\end{landscape}
 
Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
US Fish & Wildlife Service
California, USA



----- Original Message ----
> From: Kingsford Jones <kingsfordjones at gmail.com>
> To: li li <hannah.hlx at gmail.com>
> Cc: r-help <r-help at r-project.org>
> Sent: Fri, July 23, 2010 12:49:20 PM
> Subject: Re: [R] Figures in Latex
> 
> to make the desired within R's plotting device rather than in latex try:
> 
> par(mfrow = c(3, 2))
> 
> and you'll probably want to adjust other mar, parameters as well (e.g.
> mar, cex.lab, etc).
> 
> Or, take advantage of the flexibility offered by the graphics package
> by studying ?layout
> 
> hth,
> Kingsford
> 
> 
> 
> On Fri, Jul 23, 2010 at 7:43 AM, li li <hannah.hlx at gmail.com> wrote:
> > Hi all,
> >   I want to add 6 plots in the format of 2 columns and 3 rows as one
> > figure in latex. The plots are in .eps file.
> > I know how to add 2 plots side by side, but could not figure out how to do
> > multiple rows.
> >  I know this may not be the right place to ask such a question. But I do
> > not know who to ask, so just try my
> > luck here.
> >  Thank you in advance.
> >                                                      Hannah
> >
> >        [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > 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.
> >
> 
> ______________________________________________
> 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.
> 






More information about the R-help mailing list