Your cart is currently empty!
Just found an easy way to include figures from Stata into Latex by converting Stata-figures to PDF-files first. Just use the following codes: global infile=”FOLDER_TO_SAVE_FIGURES” twoway (ANY_GRAPHIC_COMMAND) gr export “$infile/FILENAME.eps”, as(eps) preview(off) replace !epstopdf “$infile/FILENAME.eps” That saves FILENAME.pdf into folder defined in the global infile (most probably MikTex needs to be installed for that). In…
Just found an easy way to include figures from Stata into Latex by converting Stata-figures to PDF-files first. Just use the following codes:
global infile="FOLDER_TO_SAVE_FIGURES"
twoway (ANY_GRAPHIC_COMMAND)
gr export "$infile/FILENAME.eps", as(eps) preview(off) replace
!epstopdf "$infile/FILENAME.eps"
That saves FILENAME.pdf into folder defined in the global infile
(most probably MikTex needs to be installed for that).
In Latex, simply use the following code:
\begin{figure}[H]
\caption{ANYTITLE}\label{fig1}
\begin{center}
\includegraphics[height=5in,angle=90]{infile/FILENAME.pdf}
\end{center}
\end{figure}
Leave a Reply
You must be logged in to post a comment.