Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: How to output graphs coordinates into a file ?


From   Jean-François Morazzani <jf.morazzani@ecopa.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: How to output graphs coordinates into a file ?
Date   Tue, 5 Mar 2013 14:31:59 +0000

Hi all,

Is there a way to save graphs' coordinates in text/csv format?

Suppose I run Stata to "calculate" an histogram and I want to use the points coordinates in another program.
So, I want to save the histogram points in csv or txt form.

For example to fetch the density of var1:
set graphic off
histogram var1
set graphic on
...

I found a way to do it for the roc curves using the following command:
roccurve var1 var2, genrocvars
keep fpr1 tpr1
outsheet using "$data_dir\roc_coordinates.csv", replace delimiter(";")

Note that you will need to install the pcvsuite package from http://labs.fhcrc.org/pepe/stata.

So, is there a better way or more precisely a Stata library that can catch graph coordinates' ?
I wish to do it at least for histograms and scatterplots.

Thanks in advance.

Regards,

JFM (newcomer to Stata's world)


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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index