Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: RE: xline on top of rarea


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: xline on top of rarea
Date   Fri, 10 Sep 2010 00:59:27 +0200

<>

*************
sysuse auto, clear
quietly regress mpg weight
predict hat
predict s, stdf
generate low = hat - 1.96*s
generate hi = hat + 1.96*s

tw (rarea low hi weight, sort) /// 
(pcarrowi -2 3000 40 3000, lcolor(black) /// 
mcolor(black) msize(zero) legend(off))
*************


HTH
Martin

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Friedrich Huebler
Sent: Freitag, 10. September 2010 00:14
To: [email protected]
Subject: st: xline on top of rarea

The commands below, adopted from an example in -help twoway rarea-,
draw a graph with a shaded area and an added line at x=3000. The
shaded area covers the added line. Can this line be drawn on top of
the shaded area? It is possible to draw such a line with the Graph
Editor but I prefer a solution that does not require the Graph Editor.

sysuse auto
quietly regress mpg weight
predict hat
predict s, stdf
generate low = hat - 1.96*s
generate hi = hat + 1.96*s
twoway rarea low hi weight, ///
  sort color(gs14) xline(3000)

Thank you for your help,

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

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index