This misses the key point, as explained
earlier by Friedrich Huebler. It is the \`
combination which is problematic.
The rhyme and reason behind this
were rehearsed in a thread last
week started by Devra Golbe on -foreach- syntax.
Nick
[email protected]
mendezboo replied to Martyn Sherriff
> > 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.
> >
> > 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
> 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/