Nick's proposal can be modified to avoid having to specify the precise
coordinates of the line, an issue addressed by Dave earlier in this
thread. I assume that the line always start at the origin.
. sysuse auto
. sum weight, meanonly
. local max = r(max)
. sum price, meanonly
. if r(max) > `max' {
local max = r(max)
}
. scatter weight price || scatteri 0 0 `max' `max', recast(line) name(a)
. scatter price weight || scatteri 0 0 `max' `max', recast(line) name(b)
Friedrich
On Mon, Mar 15, 2010 at 8:06 AM, Nick Cox <n.j.cox@durham.ac.uk> wrote:
> [...]
>
> However, there is yet another way to do it:
>
> . sysuse auto
>
> . scatter weight price || scatteri 0 0 15000 15000, recast(line)
*
* 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/