Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: added graph feature: solution??


From   Ron�n Conroy <[email protected]>
To   "statalist hsphsun2.harvard.edu" <[email protected]>
Subject   Re: st: RE: added graph feature: solution??
Date   Wed, 04 Aug 2004 10:48:55 +0100

on 03/08/2004 18:30, Nick Cox at [email protected] wrote:

> A few days ago, I pointed someone to
> the -undocumented- options in this area.
> Following that lead,
> 
> . gs_fileinfo <whatever>.gph
> 
> returns this information in r(command)
> etc. 

We're almost there. I tried this, and got the following

. gs_fileinfo  "/Users/ronanconroy/Documents/Consult files/Richard
Costello/FVC50.gph"

. di r(command)
twoway  (line  __00000H __00000I _t, sort connect(J ...) ylabel(0(.25)1,
grid) ytitle(`""')  x
> title(`"analysis time"') pstyle( p1 p2) title(`"Kaplan-Meier survival
estimates, by FVC"' `"
> "') legend(order(1 2))   yscale( ) ytitle(Proportion surv



There is an obvious problem: the graph (A Kaplan-Meier) is described in
terms of the variables that Stata calculated, and the underlying command
(-twoway-) not the original command syntax that I used (-sts graph-).


However, the other information returned is very useful indeed. So much so
that I am surprised that Stata doesn't have a menu item saying 'get graph
info' rather than an undocumented command!

With a little modification, however, it is clear that Stata could capture,
verbatim, the command used to generate a graph. What it captures right now
is maddeningly close...



Ronan M Conroy ([email protected])
Lecturer in Biostatistics
Royal College of Surgeons
Dublin 2, Ireland
+353 1 402 2431 (fax 2764)

--------------------
Just say no to drug reps
http://www.nofreelunch.org/

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



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index