Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

RE: st: graph: how to draw 45 degree reference line


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: graph: how to draw 45 degree reference line
Date   Sun, 14 Mar 2010 17:48:12 -0000

Plotting a variable against itself is also sufficient. 

tw scatter weight price || line price price, sort

Nick 
n.j.cox@durham.ac.uk 

Philipp Rehm

sysuse auto, clear
tw (scatter weight price) ///
  (function y=x, range(0 16000))


On 3/13/2010 3:13 PM, Sun, Yan (IFPRI) wrote:

> I would like to draw a y=x reference line (which is 45 degree line)
for
> my twoway scatter plots. 

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