Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

re: st: Printing graphs to pdf under program control


From   [email protected]
To   [email protected]
Subject   re: st: Printing graphs to pdf under program control
Date   Wed, 13 Oct 2004 10:00:11 +0200





Ian,

Let me not answer your question, but suggest an alternative route to
producing PDF graphs. It is using the command line programme -epstopdf- (a
google search will point you to download sites). For the sake of laziness,
I just quote a message I posted on Statalist in November 2003:

(See the whole thread on
http://www.stata.com/statalist/archive/2003-11/index.html#00215 )

>>>>>>>>

However, under Windows, I've used the command-line converter -epstopdf-
(available in most LaTeX distributions I believe) without any problem. That
is: I export my Stata graph to EPS, call the external command -epstopdf- to
convert it to PDF, and the PDF file can be imported and PDFLaTeX-ed without
a glitch.

This can be done a one-step procedure with the following programme. Use
-grexportpdf using ... - instead of the official -graph export ...-

Best wishes

Philippe


*! grexportpdf 1.0, Ph.Van Kerm, Aug-2003
* this command exports current graph to PDF (requires epstopdf installed!!)
*  grexportpdf using path/filename
  cap pr drop grexportpdf
  pr def grexportpdf
    version 8
    syntax using/
    loc using = subinstr("`using'",".pdf","",.)
    gr export "`using'.eps" , replace
    !epstopdf "`using'.eps"
    erase "`using'.eps"
  end

>>>>

I hope this helps.

Philippe




<<<>>><<<>>><<<>>><<<>>><<<>>><<<>>><<<>>><<<>>><<<>>>
Dr. Philippe Van Kerm
IRISS - Integrated Research Infrastructure in the
Socio-Economic Sciences
CEPS/INSTEAD
BP48, L-4501 Differdange, Luxembourg
>> http://www.ceps.lu/iriss <<
>> http://econpapers.hhs.se/RAS/pva19.htm <<
<<<>>><<<>>><<<>>><<<>>><<<>>><<<>>><<<>>><<<>>><<<>>>





**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept for the presence of computer viruses.

**********************************************************************

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index