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]

st: vertical lines between two co-ordinates in graph


From   Marco Ercolani <m.g.ercolani@bham.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: vertical lines between two co-ordinates in graph
Date   Thu, 29 Sep 2011 10:57:31 +0100

Dear Statalisters,

Can Stata draw a vertical line between two co-ordinates of a graph? I need to do this for numerous graphs so I don't want to do it manually using a graph editor.

I need a line that starts at the intersection of two curves and reaches down to the horizontal axis. For the example below, I can draw a horizontal line at y=94 for x= 0 to 4 but not the vertical line at x=4 for y= 0 to 94.

twoway (function y =  94              , range(0  4) )/*
 */    (function y =  x^2 + 14*x +  22, range(0 7.5) )  /*
 */    (function y = -x^2 - 10*x + 150, range(0 7.5) ), /*
 */    legend(off)

yours,

Marco G. Ercolani
University of Birmingham
*
*   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