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   Roger Harbord <[email protected]>
To   [email protected]
Subject   Re: st: added line in front of area shading
Date   Fri, 25 Jun 2004 11:25:12 +0100

That's a possibility, but doesn't look as nice.
I had another look in the archives and found this:

http://www.stata.com/statalist/archive/2003-10/msg00502.html

- wherein Jeff Pitblado answers the same question raised by Michael Blasnik.

Jeff's solution is to use -twoway function- to add the line:

. twoway lfitci mpg headroom || function y=20, range(headroom) clcolor(fg)

In fact i searched on -rarea- and that message only came up because -rarea- is in the "next by date" message! Usually such behaviour appears to be a misfeature of the search facility but serendipity strikes... Previously I searched on "added line" which didn't bring this message up either. Ideally I'd like to have been able to search on something like
"(added line OR yline OR xline ) AND (rarea OR lfitci)"

Anyone know if the search engine supports such operators?
(if it does the syntax is not that)

Roger.
----------------------------------------------------
Roger Harbord mailto:[email protected]
Department of Social Medicine, University of Bristol


--On 25 June 2004 16:27 +0900 Toyoto Iwata <[email protected]> wrote:


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/

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index