On Wed, 9 Apr 2003, Philippe Glaziou wrote:
> Lars Korsholm <[email protected]> wrote:
> > will exporting graphs in pdf format be available on other
> > platforms as well?
> > I use unix and linux
> > We realy miss it
>
> Then a pdf graph will be produced using:
>
> . graph export foo.ps
> . !ps2pdf foo.ps
>
and Alan Riley from stat corp wrote something like this.
I was looking for a direct way.
I have written a small wrapper program, see below.
best lars
######### ado file ###########
*! Lars Korsholm: 09april2003
program define exportpdf
version 8.0
syntax namelist(min=1 max=1) [, REmove *]
local file `"`namelist'.eps"'
graph export `file', `options'
! epstopdf `file'
if "`remove'"!="" {
! rm `file'
}
end
exit
#### help file ########
.-
help for ^exportpdf^
.-
Exporting graphs in pdf format on unix/linux systems
----------------------------------------------------
^exportpdf^ filename [, remove options ]
Description
-----------
^exportpdf^ is a wrapper for ^graph export filename.eps^
and a system call of ^epstopdf^.
The ^filname^ should be given without ^.pdf^ extension.
As a by-prodict an ^filename.eps^ file is produced.
Options
-------
^remove^ specifie that the eps file should be remove from the file system.
^options^ are any options that goes with @graph export@
Examples
--------
. ^suysuse auto^
. ^scatter mpg weight^
. ^exportpdf test^
. ^exportpdf test2, replace^
Author
------
Lars Korsholm
Dept of Statistics
University of Sourthern Denmark
[email protected]
Also See
--------
On-line: help on @graph export@
*
* 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/