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

Re: st: RE: Adding lines to graphs

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 <>:


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)


-----Original Message-----
[]On Behalf Of
Sent: 10 November 2005 20:14
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

*   For searches and help try:

*   For searches and help try:

*   For searches and help try:

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