[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
celdjt@umich.edu |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: RE: Adding lines to graphs |

Date |
Thu, 10 Nov 2005 23:09:07 -0500 |

Thanks Nick. I'll see if I can make it work. Quoting Nick Cox <n.j.cox@durham.ac.uk>:

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

n.j.cox@durham.ac.uk

-----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of celdjt@umich.edu Sent: 10 November 2005 20:14 To: statalist@hsphsun2.harvard.edu 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/

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

**References**:**st: RE: Adding lines to graphs***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**st: Pooled VAR models** - Next by Date:
**Re: st: nestreg and survey logistic** - Previous by thread:
**st: RE: Adding lines to graphs** - Next by thread:
**RE: st: create dummy variables for every 5 values** - Index(es):

© Copyright 1996–2016 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |