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: How to output graphs coordinates into a file ?
From
Jean-François Morazzani <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE: st: How to output graphs coordinates into a file ?
Date
Tue, 5 Mar 2013 15:28:52 +0000
Thanks Maarten.
I'll have a look and let you know the outcome.
Regards,
JFM
-----Message d'origine-----
De : [email protected] [mailto:[email protected]] De la part de Maarten Buis
Envoyé : mardi 5 mars 2013 16:09
À : [email protected]
Objet : Re: st: How to output graphs coordinates into a file ?
In case of a histogram see -help twoway__histogram_gen- and David A. Harrison (2005) Stata tip 20: Generating histogram bin variables. The Stata Journal, 5(2): 280--281.
<http://www.stata-journal.com/article.html?article=gr0014>
In case of a scatter plot the coordinates are just (a subset of) the dataset currently in memory, so nothing special needs to be done there.
A more general solution, but one that requires a more advanced understanding of Stata, is to look at -help serset-.
-- Maarten
On Tue, Mar 5, 2013 at 3:31 PM, Jean-François Morazzani wrote:
> 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/
--
---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany
http://www.maartenbuis.nl
---------------------------------
*
* 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/
*
* 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/