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

st: RE: add diagonal line to graph


From   "David Harrison" <David@icnarc.org>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: add diagonal line to graph
Date   Mon, 14 Feb 2005 12:13:19 -0000

The easiest way I know is to overlay (or more likely underlay) a -twoway function- plot, e.g.

scatter yvar xvar

becomes

twoway (function x, range(xvar) n(2)) (scatter yvar xvar)

to have the diagonal line underneath, or

twoway (scatter yvar xvar) (function x, range(xvar) n(2))

with the diagonal line on top.

David
david@icnarc.org

-----Original Message-----
From: Falko Juessen [mailto:F.Juessen@wiso.uni-dortmund.de]
Sent: 14 February 2005 10:24
To: statalist@hsphsun2.harvard.edu
Subject: st: add diagonal line to graph


Hello all,

I want do add a diagonal line to a scatterplot (the main diagonal).
I know how to add a horizontal or vertical line ( - help
added_line_options - ) but I don't know how to add a diagonal line.

Any suggestions?

Thanks in advance,
Falko.
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index