--- In [email protected], "Martyn Sherriff"
<martyn.sherriff@k...> wrote:
> I want to save all of the 12 graphs generated by this code. They
all display
> correctly on screen, but only the last graph is saved. Presumably
I am
> over-writing the existing plots. What is the correct syntax to
achieve this.
> Thanks,
> Martyn
>
> set more off
> foreach x in lbr lbl llr lll llo lro rbr rbl rlr rll rlo rro{
> graph dot (mean) `x' (min) min= `x' (max) max= `x' if system==1,
> over(implant) mark(1, msymbol(circle_hollow)) mark(2,
> msymbol(circle_hollow)) mark(3, msymbol(circle_hollow)) linetype
(dot) dots(
> msymbol(x) ) ytitle(Distance) title(Non Welded)
> graph export c:\Students\`x'.wmf,replace
> }
> set more on
>
> Dr. Martyn Sherriff
> Senior Lecturer, Dental Biomaterials Science,
> GKT Dental Institute,
> Floor 17, Guy's Tower,
> London Bridge, London SE1 9RT
> e-mail: martyn.sherriff@k...
> Tel. +44(0)-2071-881822
> Fax. +44(0)-2071-881823
> Departmental Home Page: http://tinyurl.com/2eotw
> Personal Home Page: http://tinyurl.com/kgkd
> Youth Rugby: www.fullerians.demon.co.uk
> "The difference between winners and losers is that winners tell
the jokes
> and the losers talk about the run of the ball."
> "It's not over until the fat man whistles."
>
>
> *
> * 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/
this works for me: the command grss combined with the command do2htm
you can find them by typing "findit grss" or findit "do2htm" in the
comand line, the first one creates graphics slide show and the
second one puts the output in html that way you can later save the
graphics as you would with any picture over the internet.
with your code once installed the mentioned commands you should
create a do.file like this:
use "c:\path\yourfile.dta"
set more off
foreach x in lbr lbl llr lll llo lro rbr rbl rlr rll rlo rro{
grss graph dot (mean) `x' (min) min= `x' (max) max= `x' if
system==1,
over(implant) mark(1, msymbol(circle_hollow)) mark(2,
msymbol(circle_hollow)) mark(3, msymbol(circle_hollow)) linetype
(dot) dots(
msymbol(x) ) ytitle(Distance) title(Non Welded)
graph export c:\Students\`x'.wmf,replace
}
set more on
after creating that do file, then run:
do2htm yourdofile.do
then look at yourfile.html in your browser.
*
* 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/