Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: Legend with twoway rarea and a patterned border


From   Scott Merryman <[email protected]>
To   [email protected]
Subject   Re: st: RE: Legend with twoway rarea and a patterned border
Date   Sun, 8 Nov 2009 14:18:41 -0600

On Sun, Nov 8, 2009 at 8:07 AM, Davide Cantoni <[email protected]> wrote:
> Dear Martin,
>
>> Normally playing around with the Graph Editor solves this stuff, but I could not find the magic bullet in this case... Still, why not just go for three -line-s then?
>
> Thanks for your answer. I'm glad it seems there's nothing obvious I
> overlooked.

Use -fcolor(white)- rather than -fcolor(none)- and with overlapping
areas and lines you will to change the order they area drawn:


twoway (rarea ub2 lb2 headr, lpattern(longdash) fcolor(white)) ///
       (rarea ub lb headr) ///
	   (line beta headr) ///
       (line beta2 headr) ///
	   (rarea ub2 lb2 headr, lpattern(longdash) fcolor(none)), ///
       legend(order(3 2 4 1 ) label(1 "Point est./95% c.i.: mpg on weight") ///
       label (3 "") label(2 "Point est./95% c.i.: mpg on price") label
(4 "")) ///
       scheme(s1mono) xtitle(Headroom) ytitle(Coefficient estimate)


Scott
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index