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   Davide Cantoni <davide.cantoni@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: Legend with twoway rarea and a patterned border
Date   Mon, 9 Nov 2009 00:28:21 -0500

Scott, thanks, this is a good solution in fact, even though it doesn't
feel quite right to have to fool Stata in that way.

The fact that it doesn't get the legend thumbnail right when choosing
-fcolor(none)- is still an odd behaviour of Stata's, isn't it? Or is
there a logical explanation for it which I'm missing?

Thanks again, Davide

2009/11/8 Scott Merryman <scott.merryman@gmail.com>:
> 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index