From: "Nick Cox" <[email protected]>
Reply-To: [email protected]
To: <[email protected]>
Subject: st: RE: automating multiple graphs to be exported from a do file
Date: Sat, 29 Nov 2003 11:44:57 -0000
The crucial detail here is that the information
leading up to each command differs. That being
so, it is difficult to suggest ways of speeding
this up very much. You could save yourself
a little typing by a one-off program like
program myexport
version 8
graph export `0'.wmf
end
so that if you type
myexport filename1
it gets expanded to
graph export filename1.wmf
Of course you could use a shorter name.
And such a program would need watching
carefully for complicated Windows-names
with spaces, etc.
As soon as you're doing _essentially_
the same stuff again and again, the
picture changes.
Nick
[email protected]
b. water
>
> Win98se, Stata 8.2.
>
> I have thought about this problem but quite happy with the
> status quo at the
> moment. So if no solution I am ok but would like to hear
> any offer of advice/help.
>
> Do-file:
>
> Blah
> Blah
> Blah
> gr blah blah
> graph export filename1.wmf
>
> Bloh
> Bloh
> Bloh
> gr bloh bloh
> graph export filename2.wmf
>
> Blih
> Blih
> Blih
> gr blih blih
> graph export filename3.wmf
>
> Bluh
> Bluh
> Bluh
> gr bluh bluh
> graph export filename_n.wmf
>
> So, right now I only have 12 graphs to produce. So in my
> do-file I don't
> mind cutting, pasting, and naming the graph in increments.
> I can imagine
> though that if I have a bit more to do, it might be more
> efficient to write
> ala Nick (Cox)'s one (or two liners) to automate this task.
> At the moment
> this is beyond me and I do not know whether this can be
> done e.g. using for val stuffs.
>
> By the way, the routines above the individual graph command are all
> different.
*
* 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/
_________________________________________________________________