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]

Re: st: RE: graphing lines


From   Steven Samuels <[email protected]>
To   [email protected]
Subject   Re: st: RE: graphing lines
Date   Wed, 26 Jan 2011 16:41:13 -0500


Also nice, but works only if there are observations with those values in the data set. I think that -scatteri- is the way to go.

Steve

On Jan 26, 2011, at 3:25 PM, Scott Merryman wrote:

Another possibility

. sysuse auto,clear
(1978 Automobile Data)

. scatter mpg weight || line mpg weight if mpg == 20 & weight == 3250
|  mpg == 30 & weight == 1980


Scott

On Wed, Jan 26, 2011 at 2:13 PM, Nick Cox <[email protected]> wrote:
Yes. Consider

. sysuse auto
(1978 Automobile Data)

. sc mpg weight || scatteri 20 2000 30 3000, recast(line) lw(*5)


Nick
[email protected]

Lim, Raymond

Is there a way to specify two points on a graph and draw a line connecting them? I know about xline() and yline(), but I don't want the line extending the entire plot region.

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