I am using the addlabels option with histogram. This adds height labels to ALL the bars. Instead, I want to add height labels only to bars of extreme values, ie if the variable I am plotting is above a threshold.
- Is this possible?
- Is it possible to reduce the font of these labels or change the color of their font?
Code:
local var14 x y
foreach v of var `var14' {
#d ;
histogram `v', frequency addlabels bin(50) color(red%30) lwidth(thin) ti("`v'")
xmtick(##10) xlabel(#10, angle(90) nogrid labsize(small)) ylabel(, labsize(small) nogrid)
xline(100000, lpattern(dash) lcolor(black))
xline(0, lpattern(dash) lcolor(black))
scheme(s2mono) yscale(noline) plotregion(lcolor(black) lwidth(thin));
#d cr
graph export "`v'_test.png", replace
}

Comment