Dear All,
I'd like to reflect the confidence area on the graph. This is not a big challenge, and can be done with the twoway area:

Yet one detail still makes me unhappy: by masking the gray area with a white overlap, I am losing the horizontal rules (corresponding to levels 10, 20, ...). I can not make this area transparent, because then it will not mask the gray background anymore. Yet I'd like the horizontal rule to shine through the two layers of the area-series in the chart.
Below is a minimal program, which reproduces the problem essentially, without any actual data:
And the corresponding graph:

So far the only clear idea I have is to transform the series reflecting the confidence area into a closed polygon, and draw it similarly to how spmap renders polygons.
Yet I was hoping for a somewhat simpler solution, such as adjusting the transparency, or some kind of options combination.
Thank you, Sergiy Radyakin
I'd like to reflect the confidence area on the graph. This is not a big challenge, and can be done with the twoway area:
Yet one detail still makes me unhappy: by masking the gray area with a white overlap, I am losing the horizontal rules (corresponding to levels 10, 20, ...). I can not make this area transparent, because then it will not mask the gray background anymore. Yet I'd like the horizontal rule to shine through the two layers of the area-series in the chart.
Below is a minimal program, which reproduces the problem essentially, without any actual data:
Code:
clear all set obs 1000 gen x=_n gen y=normalden((x-500)/1000,20) gen y1=y-0.000003 gen y2=y+0.000003 twoway area y2 y y1 x, fc(gray gray white) lc(white%0 white%0 white%0) /// legend( order( 4 2) label(4 "Expected ...") label(2 "Confidence area")) /// || line y x, lc(red)
So far the only clear idea I have is to transform the series reflecting the confidence area into a closed polygon, and draw it similarly to how spmap renders polygons.
Yet I was hoping for a somewhat simpler solution, such as adjusting the transparency, or some kind of options combination.
Thank you, Sergiy Radyakin
Comment