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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: adding horizontal and vertical line


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: adding horizontal and vertical line
Date   Fri, 28 Oct 2011 15:17:07 +0100

sysuse auto
su mpg, meanonly
local ymean = r(mean)
su weight, meanonly
local xmean = r(mean)
scatter mpg weight, yli(`ymean') xli(`xmean')

On Fri, Oct 28, 2011 at 3:08 PM, Edward James <ej111005@gmail.com> wrote:

> I drew a scatter plot and want to add horizontal line with mean( x
> values) and vertical line with mean (y values).
*
*   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