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 on April 23, and its replacement, 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 <>
To   "" <>
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

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.


JFM (newcomer to Stata's world)

*   For searches and help try:

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