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]
Rép. : st: Graph in Stata to a word file
From
"Herve STOLOWY" <[email protected]>
To
<[email protected]>
Subject
Rép. : st: Graph in Stata to a word file
Date
Sat, 13 Nov 2010 20:37:44 +0100
Dear Elena:
I am not a specialist of graphs but I have used them and had no problem
to copy and paste in Word. In the following example, please forget the
loop. At the end, you have the -saving- option. It creates a graph file.
foreach val in "AUS" "FRA" "GBR" {
label define post_ifrs2 0 "Pre IFRS" 1 "Post IFRS"
label values post_ifrs post_ifrs2
distinct name if abs(ib_scaled_w)<.1 & country=="`val'" & sample_sum==1
& post_ifrs==0
local n0 = r(N)
local n0bis = r(ndistinct)
distinct name if abs(ib_scaled_w)<.1 & country=="`val'" &
sample_sum==1 & post_ifrs==1
local n1 = r(N)
local n1bis = r(ndistinct)
la def `:val label post_ifrs' 0 `"`:label (post_ifrs) 0': `n0' obs."',
modify
la def `:val label post_ifrs' 1 `"`:label (post_ifrs) 1': `n1' obs."',
modify
histogram ib_scaled_w if abs(ib_scaled_w)<.1 & country=="`val'" &
sample_sum==1, bin(20) by(post_ifrs, note("Number of firms - Pre IFRS:
`n0bis' firms, Number of firms - Post IFRS: `n1bis' firms"))
title("`val'") saving (hist_`val', replace)
label drop post_ifrs2
}
After that, I open (double click) the graph file in windows explorer,
get the graph, right click on copy, paste in a word (2003) file.
There are certainly more elegant and rapid ways but it worked.
Best regards
Hervé Stolowy
>>> Elena Quercioli 13/11/10 20:18 >>>
Dear Statalista memebers,
I am having difficulties exporting a Stata graph to a word document.
Is there a good way of doing this?
Thank you in advance.
Elena
*
* 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/