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

st: RE: Adding lines to graphs


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Adding lines to graphs
Date   Thu, 10 Nov 2005 23:04:37 -0000

Given 

line y x 

You want also a line, it seems, from 

(0,0) to (x[1], y[1]) 

for which I would recommend -scatteri- as 
one solution. 

sysuse auto, clear 
sort weight 
line mpg weight, lstyle(p1) || scatteri 0 0 `= mpg[1]' `= weight[1]' , recast(line) lstyle(p1) yti(`: variable label mpg')  xti(`: variable label weight') legend(off) 
 

Nick 
[email protected] 

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of
> [email protected]
> Sent: 10 November 2005 20:14
> To: [email protected]
> Subject: st: Adding lines to graphs
> 
> 
> I have a series of interconnected monotonically declining 
> plots that I am
> presenting as a single connected line graph, i.e., a graph that starts
> relatively high on the y axis, declines, jumbs vertically to 
> a second high
> point, declines again,etc (substantively describes a 
> relationship between
> varying values of a hazard ratio and age). I can't figure out 
> how to add a line
> going from the 0 point on the x axis to the initial value of 
> the graph. I would
> be most appreciative of any suggestions. Thanks
> 
> David
> *
> *   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