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

Re: st: Overlaid Line Graph


From   [email protected] (Derek Wagner, StataCorp)
To   [email protected]
Subject   Re: st: Overlaid Line Graph
Date   Mon, 16 Jan 2006 14:40:14 -0600

Alice Dobson <[email protected]> wrote:

> Is there a way of drawing an overlaid graph by maintaining different 
> Y axes for each line graph?

You can use the -yaxis(#)- option to tell Stata to create an additional
y-axis.  In addtion, you can use the -axis(#)- suboption within the -ylabel- 
option to specify which axis should be used in each overlaid graph.  For 
example:

. twoway scatter y1 x, ylabel(0(2)10) || scatter y2 x, yaxis(2) 
ylabel(0(2)20, axis(2))

The first y-axis above is scaled from 0 to 10 in steps of 2, while the 
second is scaled from 0 to 20 in steps of 2.  Additional axes can be added 
as well for each overlaid graph with a different scale.

*
*   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