Statalist


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

st: RE: stata graph question


From   "Kieran McCaul" <Kieran.McCaul@uwa.edu.au>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: stata graph question
Date   Sun, 13 Sep 2009 07:41:45 +0800

....

Try this:


clear

set obs 100

gen x=uniform()

gen y = x^2

qui summ x
gen y2=`r(max)'

sort x
twoway (area y2 x)(area y x)



______________________________________________
Kieran McCaul MPH PhD
WA Centre for Health & Ageing (M573)
University of Western Australia
Level 6, Ainslie House
48 Murray St
Perth 6000
Phone: (08) 9224-2701
Fax: (08) 9224 8009
email: Kieran.McCaul@uwa.edu.au
http://myprofile.cos.com/mccaul 
http://www.researcherid.com/rid/B-8751-2008
______________________________________________
If you live to be one hundred, you've got it made.
Very few people die past that age - George Burns


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Mingfeng Lin
Sent: Sunday, 13 September 2009 7:30 AM
To: statalist@hsphsun2.harvard.edu
Subject: st: stata graph question

Greetings,

I wanted to plot / shade all area under a curve, or above it, in a
two-dimensional space (x,y).  Is there a way to do this in Stata?
-twoway area- probably won't cut it because I want to plot it from
above the curve to positive infinity, OR below a curve to negative
infinity.  -twoway area- only plots between the curve and the x-axis,
if I understand it correctly.  Is there a way around this?

Thank you very much for your help!

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