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

Re: st: superimpose 45 degree line in -scatter-


From   Marcello Pagano <[email protected]>
To   [email protected]
Subject   Re: st: superimpose 45 degree line in -scatter-
Date   Sun, 07 Mar 2004 11:44:32 -0500

Good solution except, of course, 0.3*x gives you a slope of 0.3 not a 30 degree line; for that you need the tangent of 30 degrees.

m.p.

Dimitriy V. Masterov wrote:


For adding lines, my quick and dirty solution is to plot x against x and
not label the line, using twoway command. This will give you a 45 line.
You can define some variables to give you any slope you want. For example,
if you wanted a 30 line.

gen h=_n;
gen v=.3*x;

Here is the command:

twoway (scatter y x, sort) (line v x),  legend(off);

Perhaps there is a more elegant way.

DVM


On Sun, 7 Mar 2004 [email protected] wrote:


Dear Statalisters,

I'm using Stata 8 and I would like to know whether and how it is possible to
superimpose a 45 degree line, a 30 degree line, etc over a -scatter- graph.

Further, does Stata support graphs in polar coordinate planes? Or did someone
wrote something on this?

many thanks in advance,
Dimitris Christodoulou

--
This mail sent through http://webmail.bangor.ac.uk
*
*   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/


_______________________________________________________________________________
Dimitriy V. Masterov

Work:
Center for Social Program Evaluation
1155 East 60th St. Room 038
Chicago, IL 60637
Work: (773)256-6005
Fax: (773)256-6313

Home:
1312 East 53rd St., Apt.309
Chicago, IL 60615
Mobile: (773)220-2760



*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index