Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: Beginner questions re saving/storing/exporting graphs in Windows


From   Maarten buis <[email protected]>
To   [email protected]
Subject   RE: st: Beginner questions re saving/storing/exporting graphs in Windows
Date   Mon, 18 Oct 2010 15:25:38 +0100 (BST)

--- On Mon, 18/10/10, Maarten buis <[email protected]> wrote:
> Alternatively, you could expand the basic file a bit, like
> this:
> *------------begin basic example ------------------- 
> cd "c:\temp"
> file open basic using basic.html, write replace
> file write basic `"<html><body>"' _n  // <-- new
> sysuse auto, clear
> foreach var of varlist mpg-trunk {
>     hist `var'
>     graph export `var'.png, replace
>     file write basic `"<img
> src="`var'.png"> <br>"' _n 
> } 
> file write basic `"<\body><\html>"' _n // <-- new
> file close basic
> *----------- end basic example ----------------------

Kit Baum pointed out privately that I made an error:

The line
file write basic `"<\body><\html>"' _n // <-- new

should have been
file write basic `"</body></html>"' _n // <-- new

Thanks,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index