Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: st: Graph png format - differences in scaling between vers. 10 and 11


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   re: st: Graph png format - differences in scaling between vers. 10 and 11
Date   Tue, 16 Mar 2010 12:58:42 +0000 (GMT)

--- On Tue, 16/3/10, Kit Baum wrote:
> If you're doing Beamer/LaTeX, why not use .eps? It is fully
> scalable and supported by any LaTeX implementation.

The problem I run into is that beamer presentations need to be
compiled using pdfLaTeX, which does not take .eps (at least it
used to complain when I tried to do that the last time I tried,
probably a couple of years ago). 

So I tend to call ps2pdf (part of ghostscrip, use google to find
that) from within my .do file, like in the example below:

*------------------ part of .do file -----------------------
graph export mean_imp.eps, replace
capture rm mean_imp.pdf
!ps2pdf -sPAPERSIZE -dDEVICEWIDTHPOINTS#432 -dDEVICEHEIGHTPOINTS#288 mean_imp.eps mean_imp.pdf
*------------------- end part of .do file -------------------- 

and than include the graph like this:

*-------------------- part of LaTeX/beamer file ---------------
\begin{frame}
    \frametitle{mean median mode imputation}
    \begin{figure}[tb]
        \centering
        \includegraphics[width=\textwidth]{mean_imp.pdf}
      \end{figure}
\end{frame}
*------------------ end part of LaTeX/beamer file --------------

I have no idea if this is better or worse than using .png, it is
just a workaround that has worked for me.

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index