Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: added line in front of area shading


From   Toyoto Iwata <iwata@med.akita-u.ac.jp>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: added line in front of area shading
Date   Fri, 25 Jun 2004 16:27:36 +0900

Sorry for often visit.

Could Roger Harbord apply tranparent CI area?

.twoway ltitci mpg headroom, yline(20) bstyle(outline)

I saw this in .help twoway_rarea


> I'm using a command that produces something similar to:
> 
> . twoway lfitci mpg headroom , yline(20)
> 
> However I want the added line to go in front of the shaded area, not behind 
> (because in my real graph i truncate the CI if it crosses the reference
line 
> so the reference line then forms the boundary, so it looks silly if it 
> disappears - the real graph uses twoway rarea but this gives the idea).
> 
> After looking at -help added_line_options- I assumed that
> 
> . twoway lfitci mpg headroom , yline(20, lstyle(foreground))
> 
>  - might do the trick, but no luck.
> 
> Clearly I can do something like
> 
> . gen refline = 20
> . twoway lfitci mpg headroom || line refline headroom, clstyle(foreground)
> . drop refline
> 
> - but then the line only extends over the range of the data, not the
range of 
> the x-axis (in my real example it looks worse).
> 

Toyoto


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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