Hi statalisters,
is anyone aware of an option that highlights selected areas in a combined kdens plot without covering the whole graph?
I tried it with _ range( ) recast(area) color( ) _ but this is not exactly what I want because it covers only the area of one graph.
In my kdens plot, I combine actually two graphs and want to highlight the overlapping area. I use Stata14.
The syntax I created so far is:
foreach test in fluid2 {
twoway (kdens `test' if abschluss_2==0 [pweight=w_t], lpattern(shortdash) bw(1) lcolor(0) ) ///
(kdens `test' if abschluss_2==1 [pweight=w_t], lpattern(solid) bw(1) lcolor(0) ), ///
legend(region(lwidth(none))) legend(lab(1 "max. Hauptschulabschluss") lab(2 "Mittlerer Schulabschluss")) ///
xlab(-4(1)2, format(%9.0g)) ///
scheme(s1mono)
}
and the graph looks as attached.
So how can I add an option that allows for highlighting the overlapping area between graph 1 and 2?
Thanks!
J.
is anyone aware of an option that highlights selected areas in a combined kdens plot without covering the whole graph?
I tried it with _ range( ) recast(area) color( ) _ but this is not exactly what I want because it covers only the area of one graph.
In my kdens plot, I combine actually two graphs and want to highlight the overlapping area. I use Stata14.
The syntax I created so far is:
foreach test in fluid2 {
twoway (kdens `test' if abschluss_2==0 [pweight=w_t], lpattern(shortdash) bw(1) lcolor(0) ) ///
(kdens `test' if abschluss_2==1 [pweight=w_t], lpattern(solid) bw(1) lcolor(0) ), ///
legend(region(lwidth(none))) legend(lab(1 "max. Hauptschulabschluss") lab(2 "Mittlerer Schulabschluss")) ///
xlab(-4(1)2, format(%9.0g)) ///
scheme(s1mono)
}
and the graph looks as attached.
So how can I add an option that allows for highlighting the overlapping area between graph 1 and 2?
Thanks!
J.
Comment