See below:
Hi-
Sorry to clog email boxes some more,
No problem -- we have the list so that your questions to get answered.
but I am wondering if anyone is
having success importing R graphs into Latex. I successfully saved my
graphs from R as pdf's. The pdf's are saved in teh same folder as my
Latex document. Here is my code I used (copied from
directly from the hwtemplate.tex document) to import my graph into Latex:
\begin{figure}[h]
\centering
\scalebox{.7}{\includegraphics{graph1.pdf}}
\caption{}
\label{f1}
\end{figure}
Note that you don't need the \caption and \label commands, unless you want
to include a caption, or refer to the figure later in your document.
I use the same code copied two more times for three
different graphs
(graph1.pdf, graph2.pdf, graph3.pdf)
This is the error message I get when I try to complie Latex in the
Terminal screen:
! LaTeX Error: Cannot determine size of graphic in graph1.pdf
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
1.65 ...scalebox{.7}{\includegraphics{graph1.pdf}}
?
<graph1.pdf>
Then the error repeats 2 more times, once for each graph. When I open
the .dvi document, I only see the first graph rotated on its side, some of the
subsequent text is missing, and then it looks normal starting on the
following page.
Does this mean graphs 2 and 3 are included properly in the document? You
can control the rotation of included graphics, if you wish. Instead of
"latex hw1", if you include your graphics as .pdf's, you may want to
"pdflatex hw1" instead. Also, you might try "xpdf graph1.pdf" just
to
make sure that the first graph is properly created.
Any ideas? Ryan, did you say you had office hours
following section
tomorrow?
Sure will.
Ryan
Thanks,
Becky
_______________________________________________
gov1000-list mailing list
gov1000-list(a)lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov1000-list