Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: How to print in black an interval in an histogram


From   "Herve STOLOWY" <stolowy@hec.fr>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: How to print in black an interval in an histogram
Date   Wed, 23 Apr 2008 16:41:06 +0200

Dear Statalisters:

I get histograms which represent the distributions of earnings (for levels of earnings between -10% and +10% of assets). I get 20 intervals. Each has a width of 1%. 

I would like to know if there is a possibility to print in black (or a different color or design) the two intervals directly adjacent to zero (which represent the heart of my study).

I provide below the command lines. (Thanks again to all the replies I received recently and which helped me to be able to get these graphs).

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

}

graph combine hist_AUS.gph hist_FRA.gph hist_GBR.gph, saving(hist_combine.gph, replace) altshrink

Best regards

Herve Stolowy








***********************************************************
Professeur/Professor
President of the French Accounting Association (AFC)
HEC Paris
Departement Comptabilite Controle de gestion / Dept of Accounting and Management Control
1, rue de la Liberation
78351 - Jouy-en-Josas
France
Tel: +33 1 39 67 94 42 - Fax: +33 1 39 67 70 86
mail: stolowy at hec dot fr
web: http://www.hec.fr/stolowy

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index