Statalist


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

RE: st: Writing graphs to the log file


From   "sdm1" <[email protected]>
To   <[email protected]>
Subject   RE: st: Writing graphs to the log file
Date   Thu, 13 Nov 2008 14:33:13 -0000

Yes please Neil!

Steve 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Neil Shephard
Sent: 13 November 2008 14:04
To: [email protected]
Subject: Re: st: Writing graphs to the log file

Nick Cox wrote:
> I don't recall any bug or problem report from Neil about -log2html-. 
> (I am one of the authors.) But -log2html- has precisely one aim: to 
> convert Stata SMCL files to HTML.
It was several years ago now that I was trying this but the fact that it was
somewhat quirky/unusual/outside the remit of -log2html- to be doing is
probably why I didn't report anything.
> If you want it to understand HTML written within your logs, then it 
> will do so only by accident, not on purpose.
>   
This quick example shows that it wasn't straight-forward as the <img> tag is
converted to literal html and is displayed in the converted log
file rather than being interpreted and inserting the image.   I probably
ended up using some external tools (sed or such like) to achieve what I was
after.

  log using test, smcl replace
  sysuse auto, clear
  twoway scatter mpg weight
  graph export test.png, as(png) replace
  di "<img src='test.png' alt='here it is'>"
  log c
  log2html test, title("In-line graphs") replace
  erase test.smcl

I'll see if I can find my old do-files at some point if I've time and work
out what I did if anyone would find it useful.

Neil

--
"We should make things as simple as possible, but not simpler" - Anon (not
Albert Einstein)


***********************************************************************
This  message  may  contain  confidential and  privileged  information.
If you  are not the  intended recipient  you should not  disclose, copy
or distribute information in this e-mail or take any action in reliance
on its contents.  To do so is strictly  prohibited and may be unlawful.
Please  inform  the  sender that  this  message has  gone astray before
deleting it.  Thank you.

2008 marks the 60th anniversary of the NHS.  It's an opportunity to pay
tribute to the NHS staff and volunteers who help shape the service, and
celebrate their achievements.

If you work for the NHS  and  would like  an NHSmail  email account, go
to: www.connectingforhealth.nhs.uk/nhsmail
***********************************************************************

*
*   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/

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index